From 5c7c48e5640b8351fa806e3068f9b63d7385c490 Mon Sep 17 00:00:00 2001 From: sunny-g Date: Mon, 6 Jan 2020 12:37:58 -0600 Subject: [PATCH 1/8] adds generated service files --- rust/Cargo.toml | 19 + rust/build.rs | 25 + rust/src/lib.rs | 11 + rust/src/proto/geometry.rs | 7596 +++++++++++++++++++++++ rust/src/proto/geometry_service.rs | 61 + rust/src/proto/geometry_service_grpc.rs | 171 + rust/src/proto/mod.rs | 7 + rust/src/proto/query.rs | 1845 ++++++ rust/src/proto/stac.rs | 5932 ++++++++++++++++++ rust/src/proto/stac_service.rs | 61 + rust/src/proto/stac_service_grpc.rs | 243 + 11 files changed, 15971 insertions(+) create mode 100644 rust/Cargo.toml create mode 100644 rust/build.rs create mode 100644 rust/src/lib.rs create mode 100644 rust/src/proto/geometry.rs create mode 100644 rust/src/proto/geometry_service.rs create mode 100644 rust/src/proto/geometry_service_grpc.rs create mode 100644 rust/src/proto/mod.rs create mode 100644 rust/src/proto/query.rs create mode 100644 rust/src/proto/stac.rs create mode 100644 rust/src/proto/stac_service.rs create mode 100644 rust/src/proto/stac_service_grpc.rs diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..6c472d4 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "stac-proto" +version = "0.1.0" +authors = ["sunny-g "] +edition = "2018" +publish = false +build = "build.rs" + +[dependencies] +futures = "0.1" +grpcio = { version = "0.4", features = ["openssl"] } +protobuf = { version = "2", features = ["with-serde"] } +serde = "1.0" +serde_derive = "1.0" + +[build-dependencies] +lazy_static = "1.4" +protobuf-codegen = { version = "2" } +protoc-grpcio = "1.1" diff --git a/rust/build.rs b/rust/build.rs new file mode 100644 index 0000000..d08d9d4 --- /dev/null +++ b/rust/build.rs @@ -0,0 +1,25 @@ +extern crate protoc_grpcio; + +fn main() { + let proto_lib_root = "src/proto"; + let proto_root = "../proto"; + let proto_files = [ + "epl/protobuf/geometry.proto", + "epl/protobuf/query.proto", + "epl/protobuf/stac.proto", + "epl/protobuf/geometry_service.proto", + "epl/protobuf/stac_service.proto", + ]; + + println!("cargo:rerun-if-changed={}", proto_root); + protoc_grpcio::compile_grpc_protos( + &proto_files, + &[proto_root], + &proto_lib_root, + Some(protobuf_codegen::Customize { + serde_derive: Some(true), + ..Default::default() + }), + ) + .expect("Failed to compile gRPC definitions!"); +} diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 0000000..7296dbc --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,11 @@ +mod proto; + +pub(crate) use futures; + +pub use proto::geometry::*; +pub use proto::geometry_service::*; +pub use proto::geometry_service_grpc::*; +pub use proto::query::*; +pub use proto::stac::*; +pub use proto::stac_service::*; +pub use proto::stac_service_grpc::*; diff --git a/rust/src/proto/geometry.rs b/rust/src/proto/geometry.rs new file mode 100644 index 0000000..be47559 --- /dev/null +++ b/rust/src/proto/geometry.rs @@ -0,0 +1,7596 @@ +// This file is generated by rust-protobuf 2.10.0. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] +//! Generated file from `epl/protobuf/geometry.proto` + +use protobuf::Message as Message_imported_for_functions; +use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0; + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryData { + // message fields + pub geometry_id: u64, + pub feature_id: ::std::string::String, + pub wkt: ::std::string::String, + pub geojson: ::std::string::String, + pub wkb: ::std::vec::Vec, + pub esri_shape: ::std::vec::Vec, + pub sr: ::protobuf::SingularPtrField, + pub envelope: ::protobuf::SingularPtrField, + pub simple: SimpleState, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryData { + fn default() -> &'a GeometryData { + ::default_instance() + } +} + +impl GeometryData { + pub fn new() -> GeometryData { + ::std::default::Default::default() + } + + // uint64 geometry_id = 1; + + + pub fn get_geometry_id(&self) -> u64 { + self.geometry_id + } + pub fn clear_geometry_id(&mut self) { + self.geometry_id = 0; + } + + // Param is passed by value, moved + pub fn set_geometry_id(&mut self, v: u64) { + self.geometry_id = v; + } + + // string feature_id = 2; + + + pub fn get_feature_id(&self) -> &str { + &self.feature_id + } + pub fn clear_feature_id(&mut self) { + self.feature_id.clear(); + } + + // Param is passed by value, moved + pub fn set_feature_id(&mut self, v: ::std::string::String) { + self.feature_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_feature_id(&mut self) -> &mut ::std::string::String { + &mut self.feature_id + } + + // Take field + pub fn take_feature_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.feature_id, ::std::string::String::new()) + } + + // string wkt = 3; + + + pub fn get_wkt(&self) -> &str { + &self.wkt + } + pub fn clear_wkt(&mut self) { + self.wkt.clear(); + } + + // Param is passed by value, moved + pub fn set_wkt(&mut self, v: ::std::string::String) { + self.wkt = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_wkt(&mut self) -> &mut ::std::string::String { + &mut self.wkt + } + + // Take field + pub fn take_wkt(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.wkt, ::std::string::String::new()) + } + + // string geojson = 4; + + + pub fn get_geojson(&self) -> &str { + &self.geojson + } + pub fn clear_geojson(&mut self) { + self.geojson.clear(); + } + + // Param is passed by value, moved + pub fn set_geojson(&mut self, v: ::std::string::String) { + self.geojson = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geojson(&mut self) -> &mut ::std::string::String { + &mut self.geojson + } + + // Take field + pub fn take_geojson(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.geojson, ::std::string::String::new()) + } + + // bytes wkb = 5; + + + pub fn get_wkb(&self) -> &[u8] { + &self.wkb + } + pub fn clear_wkb(&mut self) { + self.wkb.clear(); + } + + // Param is passed by value, moved + pub fn set_wkb(&mut self, v: ::std::vec::Vec) { + self.wkb = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_wkb(&mut self) -> &mut ::std::vec::Vec { + &mut self.wkb + } + + // Take field + pub fn take_wkb(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.wkb, ::std::vec::Vec::new()) + } + + // bytes esri_shape = 6; + + + pub fn get_esri_shape(&self) -> &[u8] { + &self.esri_shape + } + pub fn clear_esri_shape(&mut self) { + self.esri_shape.clear(); + } + + // Param is passed by value, moved + pub fn set_esri_shape(&mut self, v: ::std::vec::Vec) { + self.esri_shape = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_esri_shape(&mut self) -> &mut ::std::vec::Vec { + &mut self.esri_shape + } + + // Take field + pub fn take_esri_shape(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.esri_shape, ::std::vec::Vec::new()) + } + + // .epl.protobuf.SpatialReferenceData sr = 7; + + + pub fn get_sr(&self) -> &SpatialReferenceData { + self.sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_sr(&mut self) { + self.sr.clear(); + } + + pub fn has_sr(&self) -> bool { + self.sr.is_some() + } + + // Param is passed by value, moved + pub fn set_sr(&mut self, v: SpatialReferenceData) { + self.sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sr(&mut self) -> &mut SpatialReferenceData { + if self.sr.is_none() { + self.sr.set_default(); + } + self.sr.as_mut().unwrap() + } + + // Take field + pub fn take_sr(&mut self) -> SpatialReferenceData { + self.sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // .epl.protobuf.EnvelopeData envelope = 13; + + + pub fn get_envelope(&self) -> &EnvelopeData { + self.envelope.as_ref().unwrap_or_else(|| EnvelopeData::default_instance()) + } + pub fn clear_envelope(&mut self) { + self.envelope.clear(); + } + + pub fn has_envelope(&self) -> bool { + self.envelope.is_some() + } + + // Param is passed by value, moved + pub fn set_envelope(&mut self, v: EnvelopeData) { + self.envelope = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_envelope(&mut self) -> &mut EnvelopeData { + if self.envelope.is_none() { + self.envelope.set_default(); + } + self.envelope.as_mut().unwrap() + } + + // Take field + pub fn take_envelope(&mut self) -> EnvelopeData { + self.envelope.take().unwrap_or_else(|| EnvelopeData::new()) + } + + // .epl.protobuf.SimpleState simple = 14; + + + pub fn get_simple(&self) -> SimpleState { + self.simple + } + pub fn clear_simple(&mut self) { + self.simple = SimpleState::SIMPLE_UNKNOWN; + } + + // Param is passed by value, moved + pub fn set_simple(&mut self, v: SimpleState) { + self.simple = v; + } +} + +impl ::protobuf::Message for GeometryData { + fn is_initialized(&self) -> bool { + for v in &self.sr { + if !v.is_initialized() { + return false; + } + }; + for v in &self.envelope { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.geometry_id = tmp; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.feature_id)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.wkt)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.geojson)?; + }, + 5 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.wkb)?; + }, + 6 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.esri_shape)?; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sr)?; + }, + 13 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.envelope)?; + }, + 14 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.simple, 14, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.geometry_id != 0 { + my_size += ::protobuf::rt::value_size(1, self.geometry_id, ::protobuf::wire_format::WireTypeVarint); + } + if !self.feature_id.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.feature_id); + } + if !self.wkt.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.wkt); + } + if !self.geojson.is_empty() { + my_size += ::protobuf::rt::string_size(4, &self.geojson); + } + if !self.wkb.is_empty() { + my_size += ::protobuf::rt::bytes_size(5, &self.wkb); + } + if !self.esri_shape.is_empty() { + my_size += ::protobuf::rt::bytes_size(6, &self.esri_shape); + } + if let Some(ref v) = self.sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.envelope.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.simple != SimpleState::SIMPLE_UNKNOWN { + my_size += ::protobuf::rt::enum_size(14, self.simple); + } + 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.geometry_id != 0 { + os.write_uint64(1, self.geometry_id)?; + } + if !self.feature_id.is_empty() { + os.write_string(2, &self.feature_id)?; + } + if !self.wkt.is_empty() { + os.write_string(3, &self.wkt)?; + } + if !self.geojson.is_empty() { + os.write_string(4, &self.geojson)?; + } + if !self.wkb.is_empty() { + os.write_bytes(5, &self.wkb)?; + } + if !self.esri_shape.is_empty() { + os.write_bytes(6, &self.esri_shape)?; + } + if let Some(ref v) = self.sr.as_ref() { + os.write_tag(7, ::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.envelope.as_ref() { + os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.simple != SimpleState::SIMPLE_UNKNOWN { + os.write_enum(14, self.simple.value())?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryData { + GeometryData::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::ProtobufTypeUint64>( + "geometry_id", + |m: &GeometryData| { &m.geometry_id }, + |m: &mut GeometryData| { &mut m.geometry_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "feature_id", + |m: &GeometryData| { &m.feature_id }, + |m: &mut GeometryData| { &mut m.feature_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "wkt", + |m: &GeometryData| { &m.wkt }, + |m: &mut GeometryData| { &mut m.wkt }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "geojson", + |m: &GeometryData| { &m.geojson }, + |m: &mut GeometryData| { &mut m.geojson }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "wkb", + |m: &GeometryData| { &m.wkb }, + |m: &mut GeometryData| { &mut m.wkb }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "esri_shape", + |m: &GeometryData| { &m.esri_shape }, + |m: &mut GeometryData| { &mut m.esri_shape }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sr", + |m: &GeometryData| { &m.sr }, + |m: &mut GeometryData| { &mut m.sr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "envelope", + |m: &GeometryData| { &m.envelope }, + |m: &mut GeometryData| { &mut m.envelope }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "simple", + |m: &GeometryData| { &m.simple }, + |m: &mut GeometryData| { &mut m.simple }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryData", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryData { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryData, + }; + unsafe { + instance.get(GeometryData::new) + } + } +} + +impl ::protobuf::Clear for GeometryData { + fn clear(&mut self) { + self.geometry_id = 0; + self.feature_id.clear(); + self.wkt.clear(); + self.geojson.clear(); + self.wkb.clear(); + self.esri_shape.clear(); + self.sr.clear(); + self.envelope.clear(); + self.simple = SimpleState::SIMPLE_UNKNOWN; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryData { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryData { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct SpatialReferenceData { + // message fields + pub wkid: i32, + pub proj4: ::std::string::String, + pub custom: ::protobuf::SingularPtrField, + pub wkt: ::std::string::String, + pub esri_wkid: i32, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SpatialReferenceData { + fn default() -> &'a SpatialReferenceData { + ::default_instance() + } +} + +impl SpatialReferenceData { + pub fn new() -> SpatialReferenceData { + ::std::default::Default::default() + } + + // int32 wkid = 1; + + + pub fn get_wkid(&self) -> i32 { + self.wkid + } + pub fn clear_wkid(&mut self) { + self.wkid = 0; + } + + // Param is passed by value, moved + pub fn set_wkid(&mut self, v: i32) { + self.wkid = v; + } + + // string proj4 = 2; + + + pub fn get_proj4(&self) -> &str { + &self.proj4 + } + pub fn clear_proj4(&mut self) { + self.proj4.clear(); + } + + // Param is passed by value, moved + pub fn set_proj4(&mut self, v: ::std::string::String) { + self.proj4 = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_proj4(&mut self) -> &mut ::std::string::String { + &mut self.proj4 + } + + // Take field + pub fn take_proj4(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.proj4, ::std::string::String::new()) + } + + // .epl.protobuf.SpatialReferenceData.Custom custom = 3; + + + pub fn get_custom(&self) -> &SpatialReferenceData_Custom { + self.custom.as_ref().unwrap_or_else(|| SpatialReferenceData_Custom::default_instance()) + } + pub fn clear_custom(&mut self) { + self.custom.clear(); + } + + pub fn has_custom(&self) -> bool { + self.custom.is_some() + } + + // Param is passed by value, moved + pub fn set_custom(&mut self, v: SpatialReferenceData_Custom) { + self.custom = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_custom(&mut self) -> &mut SpatialReferenceData_Custom { + if self.custom.is_none() { + self.custom.set_default(); + } + self.custom.as_mut().unwrap() + } + + // Take field + pub fn take_custom(&mut self) -> SpatialReferenceData_Custom { + self.custom.take().unwrap_or_else(|| SpatialReferenceData_Custom::new()) + } + + // string wkt = 4; + + + pub fn get_wkt(&self) -> &str { + &self.wkt + } + pub fn clear_wkt(&mut self) { + self.wkt.clear(); + } + + // Param is passed by value, moved + pub fn set_wkt(&mut self, v: ::std::string::String) { + self.wkt = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_wkt(&mut self) -> &mut ::std::string::String { + &mut self.wkt + } + + // Take field + pub fn take_wkt(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.wkt, ::std::string::String::new()) + } + + // int32 esri_wkid = 5; + + + pub fn get_esri_wkid(&self) -> i32 { + self.esri_wkid + } + pub fn clear_esri_wkid(&mut self) { + self.esri_wkid = 0; + } + + // Param is passed by value, moved + pub fn set_esri_wkid(&mut self, v: i32) { + self.esri_wkid = v; + } +} + +impl ::protobuf::Message for SpatialReferenceData { + fn is_initialized(&self) -> bool { + for v in &self.custom { + 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 => { + 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.wkid = tmp; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.proj4)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.custom)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.wkt)?; + }, + 5 => { + 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.esri_wkid = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.wkid != 0 { + my_size += ::protobuf::rt::value_size(1, self.wkid, ::protobuf::wire_format::WireTypeVarint); + } + if !self.proj4.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.proj4); + } + if let Some(ref v) = self.custom.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if !self.wkt.is_empty() { + my_size += ::protobuf::rt::string_size(4, &self.wkt); + } + if self.esri_wkid != 0 { + my_size += ::protobuf::rt::value_size(5, self.esri_wkid, ::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<()> { + if self.wkid != 0 { + os.write_int32(1, self.wkid)?; + } + if !self.proj4.is_empty() { + os.write_string(2, &self.proj4)?; + } + if let Some(ref v) = self.custom.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 !self.wkt.is_empty() { + os.write_string(4, &self.wkt)?; + } + if self.esri_wkid != 0 { + os.write_int32(5, self.esri_wkid)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SpatialReferenceData { + SpatialReferenceData::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::ProtobufTypeInt32>( + "wkid", + |m: &SpatialReferenceData| { &m.wkid }, + |m: &mut SpatialReferenceData| { &mut m.wkid }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "proj4", + |m: &SpatialReferenceData| { &m.proj4 }, + |m: &mut SpatialReferenceData| { &mut m.proj4 }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "custom", + |m: &SpatialReferenceData| { &m.custom }, + |m: &mut SpatialReferenceData| { &mut m.custom }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "wkt", + |m: &SpatialReferenceData| { &m.wkt }, + |m: &mut SpatialReferenceData| { &mut m.wkt }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "esri_wkid", + |m: &SpatialReferenceData| { &m.esri_wkid }, + |m: &mut SpatialReferenceData| { &mut m.esri_wkid }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "SpatialReferenceData", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static SpatialReferenceData { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const SpatialReferenceData, + }; + unsafe { + instance.get(SpatialReferenceData::new) + } + } +} + +impl ::protobuf::Clear for SpatialReferenceData { + fn clear(&mut self) { + self.wkid = 0; + self.proj4.clear(); + self.custom.clear(); + self.wkt.clear(); + self.esri_wkid = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for SpatialReferenceData { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for SpatialReferenceData { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct SpatialReferenceData_Custom { + // message fields + pub lon_0: f64, + pub lat_0: f64, + pub cs_type: SpatialReferenceData_CSType, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SpatialReferenceData_Custom { + fn default() -> &'a SpatialReferenceData_Custom { + ::default_instance() + } +} + +impl SpatialReferenceData_Custom { + pub fn new() -> SpatialReferenceData_Custom { + ::std::default::Default::default() + } + + // double lon_0 = 1; + + + pub fn get_lon_0(&self) -> f64 { + self.lon_0 + } + pub fn clear_lon_0(&mut self) { + self.lon_0 = 0.; + } + + // Param is passed by value, moved + pub fn set_lon_0(&mut self, v: f64) { + self.lon_0 = v; + } + + // double lat_0 = 2; + + + pub fn get_lat_0(&self) -> f64 { + self.lat_0 + } + pub fn clear_lat_0(&mut self) { + self.lat_0 = 0.; + } + + // Param is passed by value, moved + pub fn set_lat_0(&mut self, v: f64) { + self.lat_0 = v; + } + + // .epl.protobuf.SpatialReferenceData.CSType cs_type = 3; + + + pub fn get_cs_type(&self) -> SpatialReferenceData_CSType { + self.cs_type + } + pub fn clear_cs_type(&mut self) { + self.cs_type = SpatialReferenceData_CSType::LAMBERT_AZI; + } + + // Param is passed by value, moved + pub fn set_cs_type(&mut self, v: SpatialReferenceData_CSType) { + self.cs_type = v; + } +} + +impl ::protobuf::Message for SpatialReferenceData_Custom { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.lon_0 = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.lat_0 = tmp; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.cs_type, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.lon_0 != 0. { + my_size += 9; + } + if self.lat_0 != 0. { + my_size += 9; + } + if self.cs_type != SpatialReferenceData_CSType::LAMBERT_AZI { + my_size += ::protobuf::rt::enum_size(3, self.cs_type); + } + 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.lon_0 != 0. { + os.write_double(1, self.lon_0)?; + } + if self.lat_0 != 0. { + os.write_double(2, self.lat_0)?; + } + if self.cs_type != SpatialReferenceData_CSType::LAMBERT_AZI { + os.write_enum(3, self.cs_type.value())?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SpatialReferenceData_Custom { + SpatialReferenceData_Custom::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::ProtobufTypeDouble>( + "lon_0", + |m: &SpatialReferenceData_Custom| { &m.lon_0 }, + |m: &mut SpatialReferenceData_Custom| { &mut m.lon_0 }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "lat_0", + |m: &SpatialReferenceData_Custom| { &m.lat_0 }, + |m: &mut SpatialReferenceData_Custom| { &mut m.lat_0 }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "cs_type", + |m: &SpatialReferenceData_Custom| { &m.cs_type }, + |m: &mut SpatialReferenceData_Custom| { &mut m.cs_type }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "SpatialReferenceData_Custom", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static SpatialReferenceData_Custom { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const SpatialReferenceData_Custom, + }; + unsafe { + instance.get(SpatialReferenceData_Custom::new) + } + } +} + +impl ::protobuf::Clear for SpatialReferenceData_Custom { + fn clear(&mut self) { + self.lon_0 = 0.; + self.lat_0 = 0.; + self.cs_type = SpatialReferenceData_CSType::LAMBERT_AZI; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for SpatialReferenceData_Custom { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for SpatialReferenceData_Custom { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum SpatialReferenceData_CSType { + LAMBERT_AZI = 0, +} + +impl ::protobuf::ProtobufEnum for SpatialReferenceData_CSType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(SpatialReferenceData_CSType::LAMBERT_AZI), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [SpatialReferenceData_CSType] = &[ + SpatialReferenceData_CSType::LAMBERT_AZI, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("SpatialReferenceData_CSType", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for SpatialReferenceData_CSType { +} + +impl ::std::default::Default for SpatialReferenceData_CSType { + fn default() -> Self { + SpatialReferenceData_CSType::LAMBERT_AZI + } +} + +impl ::protobuf::reflect::ProtobufValue for SpatialReferenceData_CSType { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct EnvelopeData { + // message fields + pub xmin: f64, + pub ymin: f64, + pub xmax: f64, + pub ymax: f64, + pub sr: ::protobuf::SingularPtrField, + pub zmin: f64, + pub zmax: f64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a EnvelopeData { + fn default() -> &'a EnvelopeData { + ::default_instance() + } +} + +impl EnvelopeData { + pub fn new() -> EnvelopeData { + ::std::default::Default::default() + } + + // double xmin = 1; + + + pub fn get_xmin(&self) -> f64 { + self.xmin + } + pub fn clear_xmin(&mut self) { + self.xmin = 0.; + } + + // Param is passed by value, moved + pub fn set_xmin(&mut self, v: f64) { + self.xmin = v; + } + + // double ymin = 2; + + + pub fn get_ymin(&self) -> f64 { + self.ymin + } + pub fn clear_ymin(&mut self) { + self.ymin = 0.; + } + + // Param is passed by value, moved + pub fn set_ymin(&mut self, v: f64) { + self.ymin = v; + } + + // double xmax = 3; + + + pub fn get_xmax(&self) -> f64 { + self.xmax + } + pub fn clear_xmax(&mut self) { + self.xmax = 0.; + } + + // Param is passed by value, moved + pub fn set_xmax(&mut self, v: f64) { + self.xmax = v; + } + + // double ymax = 4; + + + pub fn get_ymax(&self) -> f64 { + self.ymax + } + pub fn clear_ymax(&mut self) { + self.ymax = 0.; + } + + // Param is passed by value, moved + pub fn set_ymax(&mut self, v: f64) { + self.ymax = v; + } + + // .epl.protobuf.SpatialReferenceData sr = 5; + + + pub fn get_sr(&self) -> &SpatialReferenceData { + self.sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_sr(&mut self) { + self.sr.clear(); + } + + pub fn has_sr(&self) -> bool { + self.sr.is_some() + } + + // Param is passed by value, moved + pub fn set_sr(&mut self, v: SpatialReferenceData) { + self.sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sr(&mut self) -> &mut SpatialReferenceData { + if self.sr.is_none() { + self.sr.set_default(); + } + self.sr.as_mut().unwrap() + } + + // Take field + pub fn take_sr(&mut self) -> SpatialReferenceData { + self.sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // double zmin = 6; + + + pub fn get_zmin(&self) -> f64 { + self.zmin + } + pub fn clear_zmin(&mut self) { + self.zmin = 0.; + } + + // Param is passed by value, moved + pub fn set_zmin(&mut self, v: f64) { + self.zmin = v; + } + + // double zmax = 7; + + + pub fn get_zmax(&self) -> f64 { + self.zmax + } + pub fn clear_zmax(&mut self) { + self.zmax = 0.; + } + + // Param is passed by value, moved + pub fn set_zmax(&mut self, v: f64) { + self.zmax = v; + } +} + +impl ::protobuf::Message for EnvelopeData { + fn is_initialized(&self) -> bool { + for v in &self.sr { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.xmin = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.ymin = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.xmax = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.ymax = tmp; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sr)?; + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.zmin = tmp; + }, + 7 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.zmax = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.xmin != 0. { + my_size += 9; + } + if self.ymin != 0. { + my_size += 9; + } + if self.xmax != 0. { + my_size += 9; + } + if self.ymax != 0. { + my_size += 9; + } + if let Some(ref v) = self.sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.zmin != 0. { + my_size += 9; + } + if self.zmax != 0. { + my_size += 9; + } + 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.xmin != 0. { + os.write_double(1, self.xmin)?; + } + if self.ymin != 0. { + os.write_double(2, self.ymin)?; + } + if self.xmax != 0. { + os.write_double(3, self.xmax)?; + } + if self.ymax != 0. { + os.write_double(4, self.ymax)?; + } + if let Some(ref v) = self.sr.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.zmin != 0. { + os.write_double(6, self.zmin)?; + } + if self.zmax != 0. { + os.write_double(7, self.zmax)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> EnvelopeData { + EnvelopeData::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::ProtobufTypeDouble>( + "xmin", + |m: &EnvelopeData| { &m.xmin }, + |m: &mut EnvelopeData| { &mut m.xmin }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "ymin", + |m: &EnvelopeData| { &m.ymin }, + |m: &mut EnvelopeData| { &mut m.ymin }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "xmax", + |m: &EnvelopeData| { &m.xmax }, + |m: &mut EnvelopeData| { &mut m.xmax }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "ymax", + |m: &EnvelopeData| { &m.ymax }, + |m: &mut EnvelopeData| { &mut m.ymax }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sr", + |m: &EnvelopeData| { &m.sr }, + |m: &mut EnvelopeData| { &mut m.sr }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "zmin", + |m: &EnvelopeData| { &m.zmin }, + |m: &mut EnvelopeData| { &mut m.zmin }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "zmax", + |m: &EnvelopeData| { &m.zmax }, + |m: &mut EnvelopeData| { &mut m.zmax }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "EnvelopeData", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static EnvelopeData { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const EnvelopeData, + }; + unsafe { + instance.get(EnvelopeData::new) + } + } +} + +impl ::protobuf::Clear for EnvelopeData { + fn clear(&mut self) { + self.xmin = 0.; + self.ymin = 0.; + self.xmax = 0.; + self.ymax = 0.; + self.sr.clear(); + self.zmin = 0.; + self.zmax = 0.; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for EnvelopeData { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for EnvelopeData { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest { + // message fields + pub geometry: ::protobuf::SingularPtrField, + pub left_geometry: ::protobuf::SingularPtrField, + pub geometry_request: ::protobuf::SingularPtrField, + pub left_geometry_request: ::protobuf::SingularPtrField, + pub right_geometry: ::protobuf::SingularPtrField, + pub right_geometry_request: ::protobuf::SingularPtrField, + pub operator: OperatorType, + pub result_encoding: Encoding, + pub operation_sr: ::protobuf::SingularPtrField, + pub result_sr: ::protobuf::SingularPtrField, + pub buffer_params: ::protobuf::SingularPtrField, + pub convex_params: ::protobuf::SingularPtrField, + pub relate_params: ::protobuf::SingularPtrField, + pub random_points_params: ::protobuf::SingularPtrField, + pub generalize_params: ::protobuf::SingularPtrField, + pub intersection_params: ::protobuf::SingularPtrField, + pub offset_params: ::protobuf::SingularPtrField, + pub cut_params: ::protobuf::SingularPtrField, + pub clip_params: ::protobuf::SingularPtrField, + pub densify_params: ::protobuf::SingularPtrField, + pub simplify_params: ::protobuf::SingularPtrField, + pub generalize_by_area_params: ::protobuf::SingularPtrField, + pub affine_transform_params: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest { + fn default() -> &'a GeometryRequest { + ::default_instance() + } +} + +impl GeometryRequest { + pub fn new() -> GeometryRequest { + ::std::default::Default::default() + } + + // .epl.protobuf.GeometryData geometry = 1; + + + pub fn get_geometry(&self) -> &GeometryData { + self.geometry.as_ref().unwrap_or_else(|| GeometryData::default_instance()) + } + pub fn clear_geometry(&mut self) { + self.geometry.clear(); + } + + pub fn has_geometry(&self) -> bool { + self.geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry(&mut self, v: GeometryData) { + self.geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry(&mut self) -> &mut GeometryData { + if self.geometry.is_none() { + self.geometry.set_default(); + } + self.geometry.as_mut().unwrap() + } + + // Take field + pub fn take_geometry(&mut self) -> GeometryData { + self.geometry.take().unwrap_or_else(|| GeometryData::new()) + } + + // .epl.protobuf.GeometryData left_geometry = 2; + + + pub fn get_left_geometry(&self) -> &GeometryData { + self.left_geometry.as_ref().unwrap_or_else(|| GeometryData::default_instance()) + } + pub fn clear_left_geometry(&mut self) { + self.left_geometry.clear(); + } + + pub fn has_left_geometry(&self) -> bool { + self.left_geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_left_geometry(&mut self, v: GeometryData) { + self.left_geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_left_geometry(&mut self) -> &mut GeometryData { + if self.left_geometry.is_none() { + self.left_geometry.set_default(); + } + self.left_geometry.as_mut().unwrap() + } + + // Take field + pub fn take_left_geometry(&mut self) -> GeometryData { + self.left_geometry.take().unwrap_or_else(|| GeometryData::new()) + } + + // .epl.protobuf.GeometryRequest geometry_request = 3; + + + pub fn get_geometry_request(&self) -> &GeometryRequest { + self.geometry_request.as_ref().unwrap_or_else(|| GeometryRequest::default_instance()) + } + pub fn clear_geometry_request(&mut self) { + self.geometry_request.clear(); + } + + pub fn has_geometry_request(&self) -> bool { + self.geometry_request.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry_request(&mut self, v: GeometryRequest) { + self.geometry_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry_request(&mut self) -> &mut GeometryRequest { + if self.geometry_request.is_none() { + self.geometry_request.set_default(); + } + self.geometry_request.as_mut().unwrap() + } + + // Take field + pub fn take_geometry_request(&mut self) -> GeometryRequest { + self.geometry_request.take().unwrap_or_else(|| GeometryRequest::new()) + } + + // .epl.protobuf.GeometryRequest left_geometry_request = 4; + + + pub fn get_left_geometry_request(&self) -> &GeometryRequest { + self.left_geometry_request.as_ref().unwrap_or_else(|| GeometryRequest::default_instance()) + } + pub fn clear_left_geometry_request(&mut self) { + self.left_geometry_request.clear(); + } + + pub fn has_left_geometry_request(&self) -> bool { + self.left_geometry_request.is_some() + } + + // Param is passed by value, moved + pub fn set_left_geometry_request(&mut self, v: GeometryRequest) { + self.left_geometry_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_left_geometry_request(&mut self) -> &mut GeometryRequest { + if self.left_geometry_request.is_none() { + self.left_geometry_request.set_default(); + } + self.left_geometry_request.as_mut().unwrap() + } + + // Take field + pub fn take_left_geometry_request(&mut self) -> GeometryRequest { + self.left_geometry_request.take().unwrap_or_else(|| GeometryRequest::new()) + } + + // .epl.protobuf.GeometryData right_geometry = 5; + + + pub fn get_right_geometry(&self) -> &GeometryData { + self.right_geometry.as_ref().unwrap_or_else(|| GeometryData::default_instance()) + } + pub fn clear_right_geometry(&mut self) { + self.right_geometry.clear(); + } + + pub fn has_right_geometry(&self) -> bool { + self.right_geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_right_geometry(&mut self, v: GeometryData) { + self.right_geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_right_geometry(&mut self) -> &mut GeometryData { + if self.right_geometry.is_none() { + self.right_geometry.set_default(); + } + self.right_geometry.as_mut().unwrap() + } + + // Take field + pub fn take_right_geometry(&mut self) -> GeometryData { + self.right_geometry.take().unwrap_or_else(|| GeometryData::new()) + } + + // .epl.protobuf.GeometryRequest right_geometry_request = 6; + + + pub fn get_right_geometry_request(&self) -> &GeometryRequest { + self.right_geometry_request.as_ref().unwrap_or_else(|| GeometryRequest::default_instance()) + } + pub fn clear_right_geometry_request(&mut self) { + self.right_geometry_request.clear(); + } + + pub fn has_right_geometry_request(&self) -> bool { + self.right_geometry_request.is_some() + } + + // Param is passed by value, moved + pub fn set_right_geometry_request(&mut self, v: GeometryRequest) { + self.right_geometry_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_right_geometry_request(&mut self) -> &mut GeometryRequest { + if self.right_geometry_request.is_none() { + self.right_geometry_request.set_default(); + } + self.right_geometry_request.as_mut().unwrap() + } + + // Take field + pub fn take_right_geometry_request(&mut self) -> GeometryRequest { + self.right_geometry_request.take().unwrap_or_else(|| GeometryRequest::new()) + } + + // .epl.protobuf.OperatorType operator = 7; + + + pub fn get_operator(&self) -> OperatorType { + self.operator + } + pub fn clear_operator(&mut self) { + self.operator = OperatorType::UNKNOWN_OPERATOR; + } + + // Param is passed by value, moved + pub fn set_operator(&mut self, v: OperatorType) { + self.operator = v; + } + + // .epl.protobuf.Encoding result_encoding = 8; + + + pub fn get_result_encoding(&self) -> Encoding { + self.result_encoding + } + pub fn clear_result_encoding(&mut self) { + self.result_encoding = Encoding::UNKNOWN_ENCODING; + } + + // Param is passed by value, moved + pub fn set_result_encoding(&mut self, v: Encoding) { + self.result_encoding = v; + } + + // .epl.protobuf.SpatialReferenceData operation_sr = 9; + + + pub fn get_operation_sr(&self) -> &SpatialReferenceData { + self.operation_sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_operation_sr(&mut self) { + self.operation_sr.clear(); + } + + pub fn has_operation_sr(&self) -> bool { + self.operation_sr.is_some() + } + + // Param is passed by value, moved + pub fn set_operation_sr(&mut self, v: SpatialReferenceData) { + self.operation_sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_operation_sr(&mut self) -> &mut SpatialReferenceData { + if self.operation_sr.is_none() { + self.operation_sr.set_default(); + } + self.operation_sr.as_mut().unwrap() + } + + // Take field + pub fn take_operation_sr(&mut self) -> SpatialReferenceData { + self.operation_sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // .epl.protobuf.SpatialReferenceData result_sr = 10; + + + pub fn get_result_sr(&self) -> &SpatialReferenceData { + self.result_sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_result_sr(&mut self) { + self.result_sr.clear(); + } + + pub fn has_result_sr(&self) -> bool { + self.result_sr.is_some() + } + + // Param is passed by value, moved + pub fn set_result_sr(&mut self, v: SpatialReferenceData) { + self.result_sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_result_sr(&mut self) -> &mut SpatialReferenceData { + if self.result_sr.is_none() { + self.result_sr.set_default(); + } + self.result_sr.as_mut().unwrap() + } + + // Take field + pub fn take_result_sr(&mut self) -> SpatialReferenceData { + self.result_sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // .epl.protobuf.GeometryRequest.BufferParams buffer_params = 11; + + + pub fn get_buffer_params(&self) -> &GeometryRequest_BufferParams { + self.buffer_params.as_ref().unwrap_or_else(|| GeometryRequest_BufferParams::default_instance()) + } + pub fn clear_buffer_params(&mut self) { + self.buffer_params.clear(); + } + + pub fn has_buffer_params(&self) -> bool { + self.buffer_params.is_some() + } + + // Param is passed by value, moved + pub fn set_buffer_params(&mut self, v: GeometryRequest_BufferParams) { + self.buffer_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_buffer_params(&mut self) -> &mut GeometryRequest_BufferParams { + if self.buffer_params.is_none() { + self.buffer_params.set_default(); + } + self.buffer_params.as_mut().unwrap() + } + + // Take field + pub fn take_buffer_params(&mut self) -> GeometryRequest_BufferParams { + self.buffer_params.take().unwrap_or_else(|| GeometryRequest_BufferParams::new()) + } + + // .epl.protobuf.GeometryRequest.ConvexParams convex_params = 12; + + + pub fn get_convex_params(&self) -> &GeometryRequest_ConvexParams { + self.convex_params.as_ref().unwrap_or_else(|| GeometryRequest_ConvexParams::default_instance()) + } + pub fn clear_convex_params(&mut self) { + self.convex_params.clear(); + } + + pub fn has_convex_params(&self) -> bool { + self.convex_params.is_some() + } + + // Param is passed by value, moved + pub fn set_convex_params(&mut self, v: GeometryRequest_ConvexParams) { + self.convex_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_convex_params(&mut self) -> &mut GeometryRequest_ConvexParams { + if self.convex_params.is_none() { + self.convex_params.set_default(); + } + self.convex_params.as_mut().unwrap() + } + + // Take field + pub fn take_convex_params(&mut self) -> GeometryRequest_ConvexParams { + self.convex_params.take().unwrap_or_else(|| GeometryRequest_ConvexParams::new()) + } + + // .epl.protobuf.GeometryRequest.RelateParams relate_params = 13; + + + pub fn get_relate_params(&self) -> &GeometryRequest_RelateParams { + self.relate_params.as_ref().unwrap_or_else(|| GeometryRequest_RelateParams::default_instance()) + } + pub fn clear_relate_params(&mut self) { + self.relate_params.clear(); + } + + pub fn has_relate_params(&self) -> bool { + self.relate_params.is_some() + } + + // Param is passed by value, moved + pub fn set_relate_params(&mut self, v: GeometryRequest_RelateParams) { + self.relate_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_relate_params(&mut self) -> &mut GeometryRequest_RelateParams { + if self.relate_params.is_none() { + self.relate_params.set_default(); + } + self.relate_params.as_mut().unwrap() + } + + // Take field + pub fn take_relate_params(&mut self) -> GeometryRequest_RelateParams { + self.relate_params.take().unwrap_or_else(|| GeometryRequest_RelateParams::new()) + } + + // .epl.protobuf.GeometryRequest.RandomPointsParams random_points_params = 14; + + + pub fn get_random_points_params(&self) -> &GeometryRequest_RandomPointsParams { + self.random_points_params.as_ref().unwrap_or_else(|| GeometryRequest_RandomPointsParams::default_instance()) + } + pub fn clear_random_points_params(&mut self) { + self.random_points_params.clear(); + } + + pub fn has_random_points_params(&self) -> bool { + self.random_points_params.is_some() + } + + // Param is passed by value, moved + pub fn set_random_points_params(&mut self, v: GeometryRequest_RandomPointsParams) { + self.random_points_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_random_points_params(&mut self) -> &mut GeometryRequest_RandomPointsParams { + if self.random_points_params.is_none() { + self.random_points_params.set_default(); + } + self.random_points_params.as_mut().unwrap() + } + + // Take field + pub fn take_random_points_params(&mut self) -> GeometryRequest_RandomPointsParams { + self.random_points_params.take().unwrap_or_else(|| GeometryRequest_RandomPointsParams::new()) + } + + // .epl.protobuf.GeometryRequest.GeneralizeParams generalize_params = 15; + + + pub fn get_generalize_params(&self) -> &GeometryRequest_GeneralizeParams { + self.generalize_params.as_ref().unwrap_or_else(|| GeometryRequest_GeneralizeParams::default_instance()) + } + pub fn clear_generalize_params(&mut self) { + self.generalize_params.clear(); + } + + pub fn has_generalize_params(&self) -> bool { + self.generalize_params.is_some() + } + + // Param is passed by value, moved + pub fn set_generalize_params(&mut self, v: GeometryRequest_GeneralizeParams) { + self.generalize_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_generalize_params(&mut self) -> &mut GeometryRequest_GeneralizeParams { + if self.generalize_params.is_none() { + self.generalize_params.set_default(); + } + self.generalize_params.as_mut().unwrap() + } + + // Take field + pub fn take_generalize_params(&mut self) -> GeometryRequest_GeneralizeParams { + self.generalize_params.take().unwrap_or_else(|| GeometryRequest_GeneralizeParams::new()) + } + + // .epl.protobuf.GeometryRequest.IntersectionParams intersection_params = 16; + + + pub fn get_intersection_params(&self) -> &GeometryRequest_IntersectionParams { + self.intersection_params.as_ref().unwrap_or_else(|| GeometryRequest_IntersectionParams::default_instance()) + } + pub fn clear_intersection_params(&mut self) { + self.intersection_params.clear(); + } + + pub fn has_intersection_params(&self) -> bool { + self.intersection_params.is_some() + } + + // Param is passed by value, moved + pub fn set_intersection_params(&mut self, v: GeometryRequest_IntersectionParams) { + self.intersection_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_intersection_params(&mut self) -> &mut GeometryRequest_IntersectionParams { + if self.intersection_params.is_none() { + self.intersection_params.set_default(); + } + self.intersection_params.as_mut().unwrap() + } + + // Take field + pub fn take_intersection_params(&mut self) -> GeometryRequest_IntersectionParams { + self.intersection_params.take().unwrap_or_else(|| GeometryRequest_IntersectionParams::new()) + } + + // .epl.protobuf.GeometryRequest.OffsetParams offset_params = 17; + + + pub fn get_offset_params(&self) -> &GeometryRequest_OffsetParams { + self.offset_params.as_ref().unwrap_or_else(|| GeometryRequest_OffsetParams::default_instance()) + } + pub fn clear_offset_params(&mut self) { + self.offset_params.clear(); + } + + pub fn has_offset_params(&self) -> bool { + self.offset_params.is_some() + } + + // Param is passed by value, moved + pub fn set_offset_params(&mut self, v: GeometryRequest_OffsetParams) { + self.offset_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_offset_params(&mut self) -> &mut GeometryRequest_OffsetParams { + if self.offset_params.is_none() { + self.offset_params.set_default(); + } + self.offset_params.as_mut().unwrap() + } + + // Take field + pub fn take_offset_params(&mut self) -> GeometryRequest_OffsetParams { + self.offset_params.take().unwrap_or_else(|| GeometryRequest_OffsetParams::new()) + } + + // .epl.protobuf.GeometryRequest.CutParams cut_params = 18; + + + pub fn get_cut_params(&self) -> &GeometryRequest_CutParams { + self.cut_params.as_ref().unwrap_or_else(|| GeometryRequest_CutParams::default_instance()) + } + pub fn clear_cut_params(&mut self) { + self.cut_params.clear(); + } + + pub fn has_cut_params(&self) -> bool { + self.cut_params.is_some() + } + + // Param is passed by value, moved + pub fn set_cut_params(&mut self, v: GeometryRequest_CutParams) { + self.cut_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cut_params(&mut self) -> &mut GeometryRequest_CutParams { + if self.cut_params.is_none() { + self.cut_params.set_default(); + } + self.cut_params.as_mut().unwrap() + } + + // Take field + pub fn take_cut_params(&mut self) -> GeometryRequest_CutParams { + self.cut_params.take().unwrap_or_else(|| GeometryRequest_CutParams::new()) + } + + // .epl.protobuf.GeometryRequest.ClipParams clip_params = 19; + + + pub fn get_clip_params(&self) -> &GeometryRequest_ClipParams { + self.clip_params.as_ref().unwrap_or_else(|| GeometryRequest_ClipParams::default_instance()) + } + pub fn clear_clip_params(&mut self) { + self.clip_params.clear(); + } + + pub fn has_clip_params(&self) -> bool { + self.clip_params.is_some() + } + + // Param is passed by value, moved + pub fn set_clip_params(&mut self, v: GeometryRequest_ClipParams) { + self.clip_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_clip_params(&mut self) -> &mut GeometryRequest_ClipParams { + if self.clip_params.is_none() { + self.clip_params.set_default(); + } + self.clip_params.as_mut().unwrap() + } + + // Take field + pub fn take_clip_params(&mut self) -> GeometryRequest_ClipParams { + self.clip_params.take().unwrap_or_else(|| GeometryRequest_ClipParams::new()) + } + + // .epl.protobuf.GeometryRequest.DensifyParams densify_params = 20; + + + pub fn get_densify_params(&self) -> &GeometryRequest_DensifyParams { + self.densify_params.as_ref().unwrap_or_else(|| GeometryRequest_DensifyParams::default_instance()) + } + pub fn clear_densify_params(&mut self) { + self.densify_params.clear(); + } + + pub fn has_densify_params(&self) -> bool { + self.densify_params.is_some() + } + + // Param is passed by value, moved + pub fn set_densify_params(&mut self, v: GeometryRequest_DensifyParams) { + self.densify_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_densify_params(&mut self) -> &mut GeometryRequest_DensifyParams { + if self.densify_params.is_none() { + self.densify_params.set_default(); + } + self.densify_params.as_mut().unwrap() + } + + // Take field + pub fn take_densify_params(&mut self) -> GeometryRequest_DensifyParams { + self.densify_params.take().unwrap_or_else(|| GeometryRequest_DensifyParams::new()) + } + + // .epl.protobuf.GeometryRequest.SimplifyParams simplify_params = 21; + + + pub fn get_simplify_params(&self) -> &GeometryRequest_SimplifyParams { + self.simplify_params.as_ref().unwrap_or_else(|| GeometryRequest_SimplifyParams::default_instance()) + } + pub fn clear_simplify_params(&mut self) { + self.simplify_params.clear(); + } + + pub fn has_simplify_params(&self) -> bool { + self.simplify_params.is_some() + } + + // Param is passed by value, moved + pub fn set_simplify_params(&mut self, v: GeometryRequest_SimplifyParams) { + self.simplify_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_simplify_params(&mut self) -> &mut GeometryRequest_SimplifyParams { + if self.simplify_params.is_none() { + self.simplify_params.set_default(); + } + self.simplify_params.as_mut().unwrap() + } + + // Take field + pub fn take_simplify_params(&mut self) -> GeometryRequest_SimplifyParams { + self.simplify_params.take().unwrap_or_else(|| GeometryRequest_SimplifyParams::new()) + } + + // .epl.protobuf.GeometryRequest.GeneralizeByAreaParams generalize_by_area_params = 22; + + + pub fn get_generalize_by_area_params(&self) -> &GeometryRequest_GeneralizeByAreaParams { + self.generalize_by_area_params.as_ref().unwrap_or_else(|| GeometryRequest_GeneralizeByAreaParams::default_instance()) + } + pub fn clear_generalize_by_area_params(&mut self) { + self.generalize_by_area_params.clear(); + } + + pub fn has_generalize_by_area_params(&self) -> bool { + self.generalize_by_area_params.is_some() + } + + // Param is passed by value, moved + pub fn set_generalize_by_area_params(&mut self, v: GeometryRequest_GeneralizeByAreaParams) { + self.generalize_by_area_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_generalize_by_area_params(&mut self) -> &mut GeometryRequest_GeneralizeByAreaParams { + if self.generalize_by_area_params.is_none() { + self.generalize_by_area_params.set_default(); + } + self.generalize_by_area_params.as_mut().unwrap() + } + + // Take field + pub fn take_generalize_by_area_params(&mut self) -> GeometryRequest_GeneralizeByAreaParams { + self.generalize_by_area_params.take().unwrap_or_else(|| GeometryRequest_GeneralizeByAreaParams::new()) + } + + // .epl.protobuf.GeometryRequest.AffineTransformParams affine_transform_params = 23; + + + pub fn get_affine_transform_params(&self) -> &GeometryRequest_AffineTransformParams { + self.affine_transform_params.as_ref().unwrap_or_else(|| GeometryRequest_AffineTransformParams::default_instance()) + } + pub fn clear_affine_transform_params(&mut self) { + self.affine_transform_params.clear(); + } + + pub fn has_affine_transform_params(&self) -> bool { + self.affine_transform_params.is_some() + } + + // Param is passed by value, moved + pub fn set_affine_transform_params(&mut self, v: GeometryRequest_AffineTransformParams) { + self.affine_transform_params = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_affine_transform_params(&mut self) -> &mut GeometryRequest_AffineTransformParams { + if self.affine_transform_params.is_none() { + self.affine_transform_params.set_default(); + } + self.affine_transform_params.as_mut().unwrap() + } + + // Take field + pub fn take_affine_transform_params(&mut self) -> GeometryRequest_AffineTransformParams { + self.affine_transform_params.take().unwrap_or_else(|| GeometryRequest_AffineTransformParams::new()) + } +} + +impl ::protobuf::Message for GeometryRequest { + fn is_initialized(&self) -> bool { + for v in &self.geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.left_geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.geometry_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.left_geometry_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.right_geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.right_geometry_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.operation_sr { + if !v.is_initialized() { + return false; + } + }; + for v in &self.result_sr { + if !v.is_initialized() { + return false; + } + }; + for v in &self.buffer_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.convex_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.relate_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.random_points_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.generalize_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.intersection_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.offset_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.cut_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.clip_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.densify_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.simplify_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.generalize_by_area_params { + if !v.is_initialized() { + return false; + } + }; + for v in &self.affine_transform_params { + 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.geometry)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.left_geometry)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.geometry_request)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.left_geometry_request)?; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.right_geometry)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.right_geometry_request)?; + }, + 7 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.operator, 7, &mut self.unknown_fields)? + }, + 8 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.result_encoding, 8, &mut self.unknown_fields)? + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.operation_sr)?; + }, + 10 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.result_sr)?; + }, + 11 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.buffer_params)?; + }, + 12 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.convex_params)?; + }, + 13 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.relate_params)?; + }, + 14 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.random_points_params)?; + }, + 15 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.generalize_params)?; + }, + 16 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.intersection_params)?; + }, + 17 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.offset_params)?; + }, + 18 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cut_params)?; + }, + 19 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.clip_params)?; + }, + 20 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.densify_params)?; + }, + 21 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.simplify_params)?; + }, + 22 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.generalize_by_area_params)?; + }, + 23 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.affine_transform_params)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.left_geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.geometry_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.left_geometry_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.right_geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.right_geometry_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.operator != OperatorType::UNKNOWN_OPERATOR { + my_size += ::protobuf::rt::enum_size(7, self.operator); + } + if self.result_encoding != Encoding::UNKNOWN_ENCODING { + my_size += ::protobuf::rt::enum_size(8, self.result_encoding); + } + if let Some(ref v) = self.operation_sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.result_sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.buffer_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.convex_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.relate_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.random_points_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.generalize_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.intersection_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.offset_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.cut_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.clip_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.densify_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.simplify_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.generalize_by_area_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.affine_transform_params.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::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.geometry.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.left_geometry.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 let Some(ref v) = self.geometry_request.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 Some(ref v) = self.left_geometry_request.as_ref() { + os.write_tag(4, ::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.right_geometry.as_ref() { + os.write_tag(5, ::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.right_geometry_request.as_ref() { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.operator != OperatorType::UNKNOWN_OPERATOR { + os.write_enum(7, self.operator.value())?; + } + if self.result_encoding != Encoding::UNKNOWN_ENCODING { + os.write_enum(8, self.result_encoding.value())?; + } + if let Some(ref v) = self.operation_sr.as_ref() { + os.write_tag(9, ::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.result_sr.as_ref() { + os.write_tag(10, ::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.buffer_params.as_ref() { + os.write_tag(11, ::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.convex_params.as_ref() { + os.write_tag(12, ::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.relate_params.as_ref() { + os.write_tag(13, ::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.random_points_params.as_ref() { + os.write_tag(14, ::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.generalize_params.as_ref() { + os.write_tag(15, ::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.intersection_params.as_ref() { + os.write_tag(16, ::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.offset_params.as_ref() { + os.write_tag(17, ::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.cut_params.as_ref() { + os.write_tag(18, ::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.clip_params.as_ref() { + os.write_tag(19, ::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.densify_params.as_ref() { + os.write_tag(20, ::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.simplify_params.as_ref() { + os.write_tag(21, ::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.generalize_by_area_params.as_ref() { + os.write_tag(22, ::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.affine_transform_params.as_ref() { + os.write_tag(23, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest { + GeometryRequest::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>( + "geometry", + |m: &GeometryRequest| { &m.geometry }, + |m: &mut GeometryRequest| { &mut m.geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "left_geometry", + |m: &GeometryRequest| { &m.left_geometry }, + |m: &mut GeometryRequest| { &mut m.left_geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "geometry_request", + |m: &GeometryRequest| { &m.geometry_request }, + |m: &mut GeometryRequest| { &mut m.geometry_request }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "left_geometry_request", + |m: &GeometryRequest| { &m.left_geometry_request }, + |m: &mut GeometryRequest| { &mut m.left_geometry_request }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "right_geometry", + |m: &GeometryRequest| { &m.right_geometry }, + |m: &mut GeometryRequest| { &mut m.right_geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "right_geometry_request", + |m: &GeometryRequest| { &m.right_geometry_request }, + |m: &mut GeometryRequest| { &mut m.right_geometry_request }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "operator", + |m: &GeometryRequest| { &m.operator }, + |m: &mut GeometryRequest| { &mut m.operator }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "result_encoding", + |m: &GeometryRequest| { &m.result_encoding }, + |m: &mut GeometryRequest| { &mut m.result_encoding }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "operation_sr", + |m: &GeometryRequest| { &m.operation_sr }, + |m: &mut GeometryRequest| { &mut m.operation_sr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "result_sr", + |m: &GeometryRequest| { &m.result_sr }, + |m: &mut GeometryRequest| { &mut m.result_sr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "buffer_params", + |m: &GeometryRequest| { &m.buffer_params }, + |m: &mut GeometryRequest| { &mut m.buffer_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "convex_params", + |m: &GeometryRequest| { &m.convex_params }, + |m: &mut GeometryRequest| { &mut m.convex_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "relate_params", + |m: &GeometryRequest| { &m.relate_params }, + |m: &mut GeometryRequest| { &mut m.relate_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "random_points_params", + |m: &GeometryRequest| { &m.random_points_params }, + |m: &mut GeometryRequest| { &mut m.random_points_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "generalize_params", + |m: &GeometryRequest| { &m.generalize_params }, + |m: &mut GeometryRequest| { &mut m.generalize_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "intersection_params", + |m: &GeometryRequest| { &m.intersection_params }, + |m: &mut GeometryRequest| { &mut m.intersection_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "offset_params", + |m: &GeometryRequest| { &m.offset_params }, + |m: &mut GeometryRequest| { &mut m.offset_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "cut_params", + |m: &GeometryRequest| { &m.cut_params }, + |m: &mut GeometryRequest| { &mut m.cut_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "clip_params", + |m: &GeometryRequest| { &m.clip_params }, + |m: &mut GeometryRequest| { &mut m.clip_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "densify_params", + |m: &GeometryRequest| { &m.densify_params }, + |m: &mut GeometryRequest| { &mut m.densify_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "simplify_params", + |m: &GeometryRequest| { &m.simplify_params }, + |m: &mut GeometryRequest| { &mut m.simplify_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "generalize_by_area_params", + |m: &GeometryRequest| { &m.generalize_by_area_params }, + |m: &mut GeometryRequest| { &mut m.generalize_by_area_params }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "affine_transform_params", + |m: &GeometryRequest| { &m.affine_transform_params }, + |m: &mut GeometryRequest| { &mut m.affine_transform_params }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest, + }; + unsafe { + instance.get(GeometryRequest::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest { + fn clear(&mut self) { + self.geometry.clear(); + self.left_geometry.clear(); + self.geometry_request.clear(); + self.left_geometry_request.clear(); + self.right_geometry.clear(); + self.right_geometry_request.clear(); + self.operator = OperatorType::UNKNOWN_OPERATOR; + self.result_encoding = Encoding::UNKNOWN_ENCODING; + self.operation_sr.clear(); + self.result_sr.clear(); + self.buffer_params.clear(); + self.convex_params.clear(); + self.relate_params.clear(); + self.random_points_params.clear(); + self.generalize_params.clear(); + self.intersection_params.clear(); + self.offset_params.clear(); + self.cut_params.clear(); + self.clip_params.clear(); + self.densify_params.clear(); + self.simplify_params.clear(); + self.generalize_by_area_params.clear(); + self.affine_transform_params.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_BufferParams { + // message fields + pub distance: f64, + pub max_deviation: f64, + pub union_result: bool, + pub max_vertices_in_full_circle: i32, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_BufferParams { + fn default() -> &'a GeometryRequest_BufferParams { + ::default_instance() + } +} + +impl GeometryRequest_BufferParams { + pub fn new() -> GeometryRequest_BufferParams { + ::std::default::Default::default() + } + + // double distance = 1; + + + pub fn get_distance(&self) -> f64 { + self.distance + } + pub fn clear_distance(&mut self) { + self.distance = 0.; + } + + // Param is passed by value, moved + pub fn set_distance(&mut self, v: f64) { + self.distance = v; + } + + // double max_deviation = 2; + + + pub fn get_max_deviation(&self) -> f64 { + self.max_deviation + } + pub fn clear_max_deviation(&mut self) { + self.max_deviation = 0.; + } + + // Param is passed by value, moved + pub fn set_max_deviation(&mut self, v: f64) { + self.max_deviation = v; + } + + // bool union_result = 3; + + + pub fn get_union_result(&self) -> bool { + self.union_result + } + pub fn clear_union_result(&mut self) { + self.union_result = false; + } + + // Param is passed by value, moved + pub fn set_union_result(&mut self, v: bool) { + self.union_result = v; + } + + // int32 max_vertices_in_full_circle = 4; + + + pub fn get_max_vertices_in_full_circle(&self) -> i32 { + self.max_vertices_in_full_circle + } + pub fn clear_max_vertices_in_full_circle(&mut self) { + self.max_vertices_in_full_circle = 0; + } + + // Param is passed by value, moved + pub fn set_max_vertices_in_full_circle(&mut self, v: i32) { + self.max_vertices_in_full_circle = v; + } +} + +impl ::protobuf::Message for GeometryRequest_BufferParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.distance = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.max_deviation = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.union_result = tmp; + }, + 4 => { + 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.max_vertices_in_full_circle = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.distance != 0. { + my_size += 9; + } + if self.max_deviation != 0. { + my_size += 9; + } + if self.union_result != false { + my_size += 2; + } + if self.max_vertices_in_full_circle != 0 { + my_size += ::protobuf::rt::value_size(4, self.max_vertices_in_full_circle, ::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<()> { + if self.distance != 0. { + os.write_double(1, self.distance)?; + } + if self.max_deviation != 0. { + os.write_double(2, self.max_deviation)?; + } + if self.union_result != false { + os.write_bool(3, self.union_result)?; + } + if self.max_vertices_in_full_circle != 0 { + os.write_int32(4, self.max_vertices_in_full_circle)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_BufferParams { + GeometryRequest_BufferParams::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::ProtobufTypeDouble>( + "distance", + |m: &GeometryRequest_BufferParams| { &m.distance }, + |m: &mut GeometryRequest_BufferParams| { &mut m.distance }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "max_deviation", + |m: &GeometryRequest_BufferParams| { &m.max_deviation }, + |m: &mut GeometryRequest_BufferParams| { &mut m.max_deviation }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "union_result", + |m: &GeometryRequest_BufferParams| { &m.union_result }, + |m: &mut GeometryRequest_BufferParams| { &mut m.union_result }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "max_vertices_in_full_circle", + |m: &GeometryRequest_BufferParams| { &m.max_vertices_in_full_circle }, + |m: &mut GeometryRequest_BufferParams| { &mut m.max_vertices_in_full_circle }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_BufferParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_BufferParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_BufferParams, + }; + unsafe { + instance.get(GeometryRequest_BufferParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_BufferParams { + fn clear(&mut self) { + self.distance = 0.; + self.max_deviation = 0.; + self.union_result = false; + self.max_vertices_in_full_circle = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_BufferParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_BufferParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_GeodeticBufferParams { + // message fields + pub distance: f64, + pub max_deviation: f64, + pub union_result: bool, + pub max_vertices_in_full_circle: i32, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_GeodeticBufferParams { + fn default() -> &'a GeometryRequest_GeodeticBufferParams { + ::default_instance() + } +} + +impl GeometryRequest_GeodeticBufferParams { + pub fn new() -> GeometryRequest_GeodeticBufferParams { + ::std::default::Default::default() + } + + // double distance = 1; + + + pub fn get_distance(&self) -> f64 { + self.distance + } + pub fn clear_distance(&mut self) { + self.distance = 0.; + } + + // Param is passed by value, moved + pub fn set_distance(&mut self, v: f64) { + self.distance = v; + } + + // double max_deviation = 2; + + + pub fn get_max_deviation(&self) -> f64 { + self.max_deviation + } + pub fn clear_max_deviation(&mut self) { + self.max_deviation = 0.; + } + + // Param is passed by value, moved + pub fn set_max_deviation(&mut self, v: f64) { + self.max_deviation = v; + } + + // bool union_result = 3; + + + pub fn get_union_result(&self) -> bool { + self.union_result + } + pub fn clear_union_result(&mut self) { + self.union_result = false; + } + + // Param is passed by value, moved + pub fn set_union_result(&mut self, v: bool) { + self.union_result = v; + } + + // int32 max_vertices_in_full_circle = 4; + + + pub fn get_max_vertices_in_full_circle(&self) -> i32 { + self.max_vertices_in_full_circle + } + pub fn clear_max_vertices_in_full_circle(&mut self) { + self.max_vertices_in_full_circle = 0; + } + + // Param is passed by value, moved + pub fn set_max_vertices_in_full_circle(&mut self, v: i32) { + self.max_vertices_in_full_circle = v; + } +} + +impl ::protobuf::Message for GeometryRequest_GeodeticBufferParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.distance = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.max_deviation = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.union_result = tmp; + }, + 4 => { + 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.max_vertices_in_full_circle = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.distance != 0. { + my_size += 9; + } + if self.max_deviation != 0. { + my_size += 9; + } + if self.union_result != false { + my_size += 2; + } + if self.max_vertices_in_full_circle != 0 { + my_size += ::protobuf::rt::value_size(4, self.max_vertices_in_full_circle, ::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<()> { + if self.distance != 0. { + os.write_double(1, self.distance)?; + } + if self.max_deviation != 0. { + os.write_double(2, self.max_deviation)?; + } + if self.union_result != false { + os.write_bool(3, self.union_result)?; + } + if self.max_vertices_in_full_circle != 0 { + os.write_int32(4, self.max_vertices_in_full_circle)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_GeodeticBufferParams { + GeometryRequest_GeodeticBufferParams::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::ProtobufTypeDouble>( + "distance", + |m: &GeometryRequest_GeodeticBufferParams| { &m.distance }, + |m: &mut GeometryRequest_GeodeticBufferParams| { &mut m.distance }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "max_deviation", + |m: &GeometryRequest_GeodeticBufferParams| { &m.max_deviation }, + |m: &mut GeometryRequest_GeodeticBufferParams| { &mut m.max_deviation }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "union_result", + |m: &GeometryRequest_GeodeticBufferParams| { &m.union_result }, + |m: &mut GeometryRequest_GeodeticBufferParams| { &mut m.union_result }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "max_vertices_in_full_circle", + |m: &GeometryRequest_GeodeticBufferParams| { &m.max_vertices_in_full_circle }, + |m: &mut GeometryRequest_GeodeticBufferParams| { &mut m.max_vertices_in_full_circle }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_GeodeticBufferParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_GeodeticBufferParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_GeodeticBufferParams, + }; + unsafe { + instance.get(GeometryRequest_GeodeticBufferParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_GeodeticBufferParams { + fn clear(&mut self) { + self.distance = 0.; + self.max_deviation = 0.; + self.union_result = false; + self.max_vertices_in_full_circle = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_GeodeticBufferParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_GeodeticBufferParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_ConvexParams { + // message fields + pub merge: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_ConvexParams { + fn default() -> &'a GeometryRequest_ConvexParams { + ::default_instance() + } +} + +impl GeometryRequest_ConvexParams { + pub fn new() -> GeometryRequest_ConvexParams { + ::std::default::Default::default() + } + + // bool merge = 1; + + + pub fn get_merge(&self) -> bool { + self.merge + } + pub fn clear_merge(&mut self) { + self.merge = false; + } + + // Param is passed by value, moved + pub fn set_merge(&mut self, v: bool) { + self.merge = v; + } +} + +impl ::protobuf::Message for GeometryRequest_ConvexParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.merge = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.merge != false { + my_size += 2; + } + 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.merge != false { + os.write_bool(1, self.merge)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_ConvexParams { + GeometryRequest_ConvexParams::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::ProtobufTypeBool>( + "merge", + |m: &GeometryRequest_ConvexParams| { &m.merge }, + |m: &mut GeometryRequest_ConvexParams| { &mut m.merge }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_ConvexParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_ConvexParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_ConvexParams, + }; + unsafe { + instance.get(GeometryRequest_ConvexParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_ConvexParams { + fn clear(&mut self) { + self.merge = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_ConvexParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_ConvexParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_RelateParams { + // message fields + pub de_9im: ::std::string::String, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_RelateParams { + fn default() -> &'a GeometryRequest_RelateParams { + ::default_instance() + } +} + +impl GeometryRequest_RelateParams { + pub fn new() -> GeometryRequest_RelateParams { + ::std::default::Default::default() + } + + // string de_9im = 1; + + + pub fn get_de_9im(&self) -> &str { + &self.de_9im + } + pub fn clear_de_9im(&mut self) { + self.de_9im.clear(); + } + + // Param is passed by value, moved + pub fn set_de_9im(&mut self, v: ::std::string::String) { + self.de_9im = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_de_9im(&mut self) -> &mut ::std::string::String { + &mut self.de_9im + } + + // Take field + pub fn take_de_9im(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.de_9im, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for GeometryRequest_RelateParams { + 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_string_into(wire_type, is, &mut self.de_9im)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.de_9im.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.de_9im); + } + 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.de_9im.is_empty() { + os.write_string(1, &self.de_9im)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_RelateParams { + GeometryRequest_RelateParams::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::ProtobufTypeString>( + "de_9im", + |m: &GeometryRequest_RelateParams| { &m.de_9im }, + |m: &mut GeometryRequest_RelateParams| { &mut m.de_9im }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_RelateParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_RelateParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_RelateParams, + }; + unsafe { + instance.get(GeometryRequest_RelateParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_RelateParams { + fn clear(&mut self) { + self.de_9im.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_RelateParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_RelateParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_RandomPointsParams { + // message fields + pub points_per_square_km: f64, + pub seed: i64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_RandomPointsParams { + fn default() -> &'a GeometryRequest_RandomPointsParams { + ::default_instance() + } +} + +impl GeometryRequest_RandomPointsParams { + pub fn new() -> GeometryRequest_RandomPointsParams { + ::std::default::Default::default() + } + + // double points_per_square_km = 1; + + + pub fn get_points_per_square_km(&self) -> f64 { + self.points_per_square_km + } + pub fn clear_points_per_square_km(&mut self) { + self.points_per_square_km = 0.; + } + + // Param is passed by value, moved + pub fn set_points_per_square_km(&mut self, v: f64) { + self.points_per_square_km = v; + } + + // int64 seed = 2; + + + pub fn get_seed(&self) -> i64 { + self.seed + } + pub fn clear_seed(&mut self) { + self.seed = 0; + } + + // Param is passed by value, moved + pub fn set_seed(&mut self, v: i64) { + self.seed = v; + } +} + +impl ::protobuf::Message for GeometryRequest_RandomPointsParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.points_per_square_km = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.seed = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.points_per_square_km != 0. { + my_size += 9; + } + if self.seed != 0 { + my_size += ::protobuf::rt::value_size(2, self.seed, ::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<()> { + if self.points_per_square_km != 0. { + os.write_double(1, self.points_per_square_km)?; + } + if self.seed != 0 { + os.write_int64(2, self.seed)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_RandomPointsParams { + GeometryRequest_RandomPointsParams::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::ProtobufTypeDouble>( + "points_per_square_km", + |m: &GeometryRequest_RandomPointsParams| { &m.points_per_square_km }, + |m: &mut GeometryRequest_RandomPointsParams| { &mut m.points_per_square_km }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "seed", + |m: &GeometryRequest_RandomPointsParams| { &m.seed }, + |m: &mut GeometryRequest_RandomPointsParams| { &mut m.seed }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_RandomPointsParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_RandomPointsParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_RandomPointsParams, + }; + unsafe { + instance.get(GeometryRequest_RandomPointsParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_RandomPointsParams { + fn clear(&mut self) { + self.points_per_square_km = 0.; + self.seed = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_RandomPointsParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_RandomPointsParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_GeneralizeParams { + // message fields + pub max_deviation: f64, + pub remove_degenerates: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_GeneralizeParams { + fn default() -> &'a GeometryRequest_GeneralizeParams { + ::default_instance() + } +} + +impl GeometryRequest_GeneralizeParams { + pub fn new() -> GeometryRequest_GeneralizeParams { + ::std::default::Default::default() + } + + // double max_deviation = 1; + + + pub fn get_max_deviation(&self) -> f64 { + self.max_deviation + } + pub fn clear_max_deviation(&mut self) { + self.max_deviation = 0.; + } + + // Param is passed by value, moved + pub fn set_max_deviation(&mut self, v: f64) { + self.max_deviation = v; + } + + // bool remove_degenerates = 2; + + + pub fn get_remove_degenerates(&self) -> bool { + self.remove_degenerates + } + pub fn clear_remove_degenerates(&mut self) { + self.remove_degenerates = false; + } + + // Param is passed by value, moved + pub fn set_remove_degenerates(&mut self, v: bool) { + self.remove_degenerates = v; + } +} + +impl ::protobuf::Message for GeometryRequest_GeneralizeParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.max_deviation = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.remove_degenerates = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.max_deviation != 0. { + my_size += 9; + } + if self.remove_degenerates != false { + my_size += 2; + } + 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.max_deviation != 0. { + os.write_double(1, self.max_deviation)?; + } + if self.remove_degenerates != false { + os.write_bool(2, self.remove_degenerates)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_GeneralizeParams { + GeometryRequest_GeneralizeParams::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::ProtobufTypeDouble>( + "max_deviation", + |m: &GeometryRequest_GeneralizeParams| { &m.max_deviation }, + |m: &mut GeometryRequest_GeneralizeParams| { &mut m.max_deviation }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "remove_degenerates", + |m: &GeometryRequest_GeneralizeParams| { &m.remove_degenerates }, + |m: &mut GeometryRequest_GeneralizeParams| { &mut m.remove_degenerates }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_GeneralizeParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_GeneralizeParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_GeneralizeParams, + }; + unsafe { + instance.get(GeometryRequest_GeneralizeParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_GeneralizeParams { + fn clear(&mut self) { + self.max_deviation = 0.; + self.remove_degenerates = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_GeneralizeParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_GeneralizeParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_GeneralizeByAreaParams { + // message fields + pub percent_reduction: f64, + pub remove_degenerates: bool, + pub max_point_count: i32, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_GeneralizeByAreaParams { + fn default() -> &'a GeometryRequest_GeneralizeByAreaParams { + ::default_instance() + } +} + +impl GeometryRequest_GeneralizeByAreaParams { + pub fn new() -> GeometryRequest_GeneralizeByAreaParams { + ::std::default::Default::default() + } + + // double percent_reduction = 1; + + + pub fn get_percent_reduction(&self) -> f64 { + self.percent_reduction + } + pub fn clear_percent_reduction(&mut self) { + self.percent_reduction = 0.; + } + + // Param is passed by value, moved + pub fn set_percent_reduction(&mut self, v: f64) { + self.percent_reduction = v; + } + + // bool remove_degenerates = 2; + + + pub fn get_remove_degenerates(&self) -> bool { + self.remove_degenerates + } + pub fn clear_remove_degenerates(&mut self) { + self.remove_degenerates = false; + } + + // Param is passed by value, moved + pub fn set_remove_degenerates(&mut self, v: bool) { + self.remove_degenerates = v; + } + + // int32 max_point_count = 3; + + + pub fn get_max_point_count(&self) -> i32 { + self.max_point_count + } + pub fn clear_max_point_count(&mut self) { + self.max_point_count = 0; + } + + // Param is passed by value, moved + pub fn set_max_point_count(&mut self, v: i32) { + self.max_point_count = v; + } +} + +impl ::protobuf::Message for GeometryRequest_GeneralizeByAreaParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.percent_reduction = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.remove_degenerates = tmp; + }, + 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.max_point_count = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.percent_reduction != 0. { + my_size += 9; + } + if self.remove_degenerates != false { + my_size += 2; + } + if self.max_point_count != 0 { + my_size += ::protobuf::rt::value_size(3, self.max_point_count, ::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<()> { + if self.percent_reduction != 0. { + os.write_double(1, self.percent_reduction)?; + } + if self.remove_degenerates != false { + os.write_bool(2, self.remove_degenerates)?; + } + if self.max_point_count != 0 { + os.write_int32(3, self.max_point_count)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_GeneralizeByAreaParams { + GeometryRequest_GeneralizeByAreaParams::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::ProtobufTypeDouble>( + "percent_reduction", + |m: &GeometryRequest_GeneralizeByAreaParams| { &m.percent_reduction }, + |m: &mut GeometryRequest_GeneralizeByAreaParams| { &mut m.percent_reduction }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "remove_degenerates", + |m: &GeometryRequest_GeneralizeByAreaParams| { &m.remove_degenerates }, + |m: &mut GeometryRequest_GeneralizeByAreaParams| { &mut m.remove_degenerates }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "max_point_count", + |m: &GeometryRequest_GeneralizeByAreaParams| { &m.max_point_count }, + |m: &mut GeometryRequest_GeneralizeByAreaParams| { &mut m.max_point_count }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_GeneralizeByAreaParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_GeneralizeByAreaParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_GeneralizeByAreaParams, + }; + unsafe { + instance.get(GeometryRequest_GeneralizeByAreaParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_GeneralizeByAreaParams { + fn clear(&mut self) { + self.percent_reduction = 0.; + self.remove_degenerates = false; + self.max_point_count = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_GeneralizeByAreaParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_GeneralizeByAreaParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_IntersectionParams { + // message fields + pub dimension_mask: i32, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_IntersectionParams { + fn default() -> &'a GeometryRequest_IntersectionParams { + ::default_instance() + } +} + +impl GeometryRequest_IntersectionParams { + pub fn new() -> GeometryRequest_IntersectionParams { + ::std::default::Default::default() + } + + // int32 dimension_mask = 1; + + + pub fn get_dimension_mask(&self) -> i32 { + self.dimension_mask + } + pub fn clear_dimension_mask(&mut self) { + self.dimension_mask = 0; + } + + // Param is passed by value, moved + pub fn set_dimension_mask(&mut self, v: i32) { + self.dimension_mask = v; + } +} + +impl ::protobuf::Message for GeometryRequest_IntersectionParams { + 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 => { + 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.dimension_mask = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.dimension_mask != 0 { + my_size += ::protobuf::rt::value_size(1, self.dimension_mask, ::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<()> { + if self.dimension_mask != 0 { + os.write_int32(1, self.dimension_mask)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_IntersectionParams { + GeometryRequest_IntersectionParams::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::ProtobufTypeInt32>( + "dimension_mask", + |m: &GeometryRequest_IntersectionParams| { &m.dimension_mask }, + |m: &mut GeometryRequest_IntersectionParams| { &mut m.dimension_mask }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_IntersectionParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_IntersectionParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_IntersectionParams, + }; + unsafe { + instance.get(GeometryRequest_IntersectionParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_IntersectionParams { + fn clear(&mut self) { + self.dimension_mask = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_IntersectionParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_IntersectionParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_OffsetParams { + // message fields + pub distance: f64, + pub join_type: GeometryRequest_OffsetParams_OffsetJoinType, + pub bevel_ratio: f64, + pub flatten_error: f64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_OffsetParams { + fn default() -> &'a GeometryRequest_OffsetParams { + ::default_instance() + } +} + +impl GeometryRequest_OffsetParams { + pub fn new() -> GeometryRequest_OffsetParams { + ::std::default::Default::default() + } + + // double distance = 1; + + + pub fn get_distance(&self) -> f64 { + self.distance + } + pub fn clear_distance(&mut self) { + self.distance = 0.; + } + + // Param is passed by value, moved + pub fn set_distance(&mut self, v: f64) { + self.distance = v; + } + + // .epl.protobuf.GeometryRequest.OffsetParams.OffsetJoinType join_type = 2; + + + pub fn get_join_type(&self) -> GeometryRequest_OffsetParams_OffsetJoinType { + self.join_type + } + pub fn clear_join_type(&mut self) { + self.join_type = GeometryRequest_OffsetParams_OffsetJoinType::ROUND; + } + + // Param is passed by value, moved + pub fn set_join_type(&mut self, v: GeometryRequest_OffsetParams_OffsetJoinType) { + self.join_type = v; + } + + // double bevel_ratio = 3; + + + pub fn get_bevel_ratio(&self) -> f64 { + self.bevel_ratio + } + pub fn clear_bevel_ratio(&mut self) { + self.bevel_ratio = 0.; + } + + // Param is passed by value, moved + pub fn set_bevel_ratio(&mut self, v: f64) { + self.bevel_ratio = v; + } + + // double flatten_error = 4; + + + pub fn get_flatten_error(&self) -> f64 { + self.flatten_error + } + pub fn clear_flatten_error(&mut self) { + self.flatten_error = 0.; + } + + // Param is passed by value, moved + pub fn set_flatten_error(&mut self, v: f64) { + self.flatten_error = v; + } +} + +impl ::protobuf::Message for GeometryRequest_OffsetParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.distance = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.join_type, 2, &mut self.unknown_fields)? + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.bevel_ratio = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.flatten_error = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.distance != 0. { + my_size += 9; + } + if self.join_type != GeometryRequest_OffsetParams_OffsetJoinType::ROUND { + my_size += ::protobuf::rt::enum_size(2, self.join_type); + } + if self.bevel_ratio != 0. { + my_size += 9; + } + if self.flatten_error != 0. { + my_size += 9; + } + 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.distance != 0. { + os.write_double(1, self.distance)?; + } + if self.join_type != GeometryRequest_OffsetParams_OffsetJoinType::ROUND { + os.write_enum(2, self.join_type.value())?; + } + if self.bevel_ratio != 0. { + os.write_double(3, self.bevel_ratio)?; + } + if self.flatten_error != 0. { + os.write_double(4, self.flatten_error)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_OffsetParams { + GeometryRequest_OffsetParams::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::ProtobufTypeDouble>( + "distance", + |m: &GeometryRequest_OffsetParams| { &m.distance }, + |m: &mut GeometryRequest_OffsetParams| { &mut m.distance }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "join_type", + |m: &GeometryRequest_OffsetParams| { &m.join_type }, + |m: &mut GeometryRequest_OffsetParams| { &mut m.join_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "bevel_ratio", + |m: &GeometryRequest_OffsetParams| { &m.bevel_ratio }, + |m: &mut GeometryRequest_OffsetParams| { &mut m.bevel_ratio }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "flatten_error", + |m: &GeometryRequest_OffsetParams| { &m.flatten_error }, + |m: &mut GeometryRequest_OffsetParams| { &mut m.flatten_error }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_OffsetParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_OffsetParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_OffsetParams, + }; + unsafe { + instance.get(GeometryRequest_OffsetParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_OffsetParams { + fn clear(&mut self) { + self.distance = 0.; + self.join_type = GeometryRequest_OffsetParams_OffsetJoinType::ROUND; + self.bevel_ratio = 0.; + self.flatten_error = 0.; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_OffsetParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_OffsetParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum GeometryRequest_OffsetParams_OffsetJoinType { + ROUND = 0, + BEVEL = 1, + MITER = 2, + SQUARE = 3, +} + +impl ::protobuf::ProtobufEnum for GeometryRequest_OffsetParams_OffsetJoinType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(GeometryRequest_OffsetParams_OffsetJoinType::ROUND), + 1 => ::std::option::Option::Some(GeometryRequest_OffsetParams_OffsetJoinType::BEVEL), + 2 => ::std::option::Option::Some(GeometryRequest_OffsetParams_OffsetJoinType::MITER), + 3 => ::std::option::Option::Some(GeometryRequest_OffsetParams_OffsetJoinType::SQUARE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [GeometryRequest_OffsetParams_OffsetJoinType] = &[ + GeometryRequest_OffsetParams_OffsetJoinType::ROUND, + GeometryRequest_OffsetParams_OffsetJoinType::BEVEL, + GeometryRequest_OffsetParams_OffsetJoinType::MITER, + GeometryRequest_OffsetParams_OffsetJoinType::SQUARE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("GeometryRequest_OffsetParams_OffsetJoinType", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for GeometryRequest_OffsetParams_OffsetJoinType { +} + +impl ::std::default::Default for GeometryRequest_OffsetParams_OffsetJoinType { + fn default() -> Self { + GeometryRequest_OffsetParams_OffsetJoinType::ROUND + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_OffsetParams_OffsetJoinType { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_CutParams { + // message fields + pub consider_touch: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_CutParams { + fn default() -> &'a GeometryRequest_CutParams { + ::default_instance() + } +} + +impl GeometryRequest_CutParams { + pub fn new() -> GeometryRequest_CutParams { + ::std::default::Default::default() + } + + // bool consider_touch = 1; + + + pub fn get_consider_touch(&self) -> bool { + self.consider_touch + } + pub fn clear_consider_touch(&mut self) { + self.consider_touch = false; + } + + // Param is passed by value, moved + pub fn set_consider_touch(&mut self, v: bool) { + self.consider_touch = v; + } +} + +impl ::protobuf::Message for GeometryRequest_CutParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.consider_touch = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.consider_touch != false { + my_size += 2; + } + 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.consider_touch != false { + os.write_bool(1, self.consider_touch)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_CutParams { + GeometryRequest_CutParams::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::ProtobufTypeBool>( + "consider_touch", + |m: &GeometryRequest_CutParams| { &m.consider_touch }, + |m: &mut GeometryRequest_CutParams| { &mut m.consider_touch }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_CutParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_CutParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_CutParams, + }; + unsafe { + instance.get(GeometryRequest_CutParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_CutParams { + fn clear(&mut self) { + self.consider_touch = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_CutParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_CutParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_ClipParams { + // message fields + pub envelope: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_ClipParams { + fn default() -> &'a GeometryRequest_ClipParams { + ::default_instance() + } +} + +impl GeometryRequest_ClipParams { + pub fn new() -> GeometryRequest_ClipParams { + ::std::default::Default::default() + } + + // .epl.protobuf.EnvelopeData envelope = 1; + + + pub fn get_envelope(&self) -> &EnvelopeData { + self.envelope.as_ref().unwrap_or_else(|| EnvelopeData::default_instance()) + } + pub fn clear_envelope(&mut self) { + self.envelope.clear(); + } + + pub fn has_envelope(&self) -> bool { + self.envelope.is_some() + } + + // Param is passed by value, moved + pub fn set_envelope(&mut self, v: EnvelopeData) { + self.envelope = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_envelope(&mut self) -> &mut EnvelopeData { + if self.envelope.is_none() { + self.envelope.set_default(); + } + self.envelope.as_mut().unwrap() + } + + // Take field + pub fn take_envelope(&mut self) -> EnvelopeData { + self.envelope.take().unwrap_or_else(|| EnvelopeData::new()) + } +} + +impl ::protobuf::Message for GeometryRequest_ClipParams { + fn is_initialized(&self) -> bool { + for v in &self.envelope { + 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.envelope)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.envelope.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.envelope.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)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_ClipParams { + GeometryRequest_ClipParams::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>( + "envelope", + |m: &GeometryRequest_ClipParams| { &m.envelope }, + |m: &mut GeometryRequest_ClipParams| { &mut m.envelope }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_ClipParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_ClipParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_ClipParams, + }; + unsafe { + instance.get(GeometryRequest_ClipParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_ClipParams { + fn clear(&mut self) { + self.envelope.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_ClipParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_ClipParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_DensifyParams { + // message fields + pub max_length: f64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_DensifyParams { + fn default() -> &'a GeometryRequest_DensifyParams { + ::default_instance() + } +} + +impl GeometryRequest_DensifyParams { + pub fn new() -> GeometryRequest_DensifyParams { + ::std::default::Default::default() + } + + // double max_length = 1; + + + pub fn get_max_length(&self) -> f64 { + self.max_length + } + pub fn clear_max_length(&mut self) { + self.max_length = 0.; + } + + // Param is passed by value, moved + pub fn set_max_length(&mut self, v: f64) { + self.max_length = v; + } +} + +impl ::protobuf::Message for GeometryRequest_DensifyParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.max_length = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.max_length != 0. { + my_size += 9; + } + 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.max_length != 0. { + os.write_double(1, self.max_length)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_DensifyParams { + GeometryRequest_DensifyParams::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::ProtobufTypeDouble>( + "max_length", + |m: &GeometryRequest_DensifyParams| { &m.max_length }, + |m: &mut GeometryRequest_DensifyParams| { &mut m.max_length }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_DensifyParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_DensifyParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_DensifyParams, + }; + unsafe { + instance.get(GeometryRequest_DensifyParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_DensifyParams { + fn clear(&mut self) { + self.max_length = 0.; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_DensifyParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_DensifyParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_SimplifyParams { + // message fields + pub force: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_SimplifyParams { + fn default() -> &'a GeometryRequest_SimplifyParams { + ::default_instance() + } +} + +impl GeometryRequest_SimplifyParams { + pub fn new() -> GeometryRequest_SimplifyParams { + ::std::default::Default::default() + } + + // bool force = 1; + + + pub fn get_force(&self) -> bool { + self.force + } + pub fn clear_force(&mut self) { + self.force = false; + } + + // Param is passed by value, moved + pub fn set_force(&mut self, v: bool) { + self.force = v; + } +} + +impl ::protobuf::Message for GeometryRequest_SimplifyParams { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.force = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.force != false { + my_size += 2; + } + 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.force != false { + os.write_bool(1, self.force)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_SimplifyParams { + GeometryRequest_SimplifyParams::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::ProtobufTypeBool>( + "force", + |m: &GeometryRequest_SimplifyParams| { &m.force }, + |m: &mut GeometryRequest_SimplifyParams| { &mut m.force }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_SimplifyParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_SimplifyParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_SimplifyParams, + }; + unsafe { + instance.get(GeometryRequest_SimplifyParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_SimplifyParams { + fn clear(&mut self) { + self.force = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_SimplifyParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_SimplifyParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryRequest_AffineTransformParams { + // message fields + pub geodetic: bool, + pub x_offset: f64, + pub y_offset: f64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryRequest_AffineTransformParams { + fn default() -> &'a GeometryRequest_AffineTransformParams { + ::default_instance() + } +} + +impl GeometryRequest_AffineTransformParams { + pub fn new() -> GeometryRequest_AffineTransformParams { + ::std::default::Default::default() + } + + // bool geodetic = 2; + + + pub fn get_geodetic(&self) -> bool { + self.geodetic + } + pub fn clear_geodetic(&mut self) { + self.geodetic = false; + } + + // Param is passed by value, moved + pub fn set_geodetic(&mut self, v: bool) { + self.geodetic = v; + } + + // double x_offset = 3; + + + pub fn get_x_offset(&self) -> f64 { + self.x_offset + } + pub fn clear_x_offset(&mut self) { + self.x_offset = 0.; + } + + // Param is passed by value, moved + pub fn set_x_offset(&mut self, v: f64) { + self.x_offset = v; + } + + // double y_offset = 4; + + + pub fn get_y_offset(&self) -> f64 { + self.y_offset + } + pub fn clear_y_offset(&mut self) { + self.y_offset = 0.; + } + + // Param is passed by value, moved + pub fn set_y_offset(&mut self, v: f64) { + self.y_offset = v; + } +} + +impl ::protobuf::Message for GeometryRequest_AffineTransformParams { + 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 { + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.geodetic = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.x_offset = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.y_offset = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.geodetic != false { + my_size += 2; + } + if self.x_offset != 0. { + my_size += 9; + } + if self.y_offset != 0. { + my_size += 9; + } + 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.geodetic != false { + os.write_bool(2, self.geodetic)?; + } + if self.x_offset != 0. { + os.write_double(3, self.x_offset)?; + } + if self.y_offset != 0. { + os.write_double(4, self.y_offset)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryRequest_AffineTransformParams { + GeometryRequest_AffineTransformParams::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::ProtobufTypeBool>( + "geodetic", + |m: &GeometryRequest_AffineTransformParams| { &m.geodetic }, + |m: &mut GeometryRequest_AffineTransformParams| { &mut m.geodetic }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "x_offset", + |m: &GeometryRequest_AffineTransformParams| { &m.x_offset }, + |m: &mut GeometryRequest_AffineTransformParams| { &mut m.x_offset }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "y_offset", + |m: &GeometryRequest_AffineTransformParams| { &m.y_offset }, + |m: &mut GeometryRequest_AffineTransformParams| { &mut m.y_offset }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryRequest_AffineTransformParams", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryRequest_AffineTransformParams { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryRequest_AffineTransformParams, + }; + unsafe { + instance.get(GeometryRequest_AffineTransformParams::new) + } + } +} + +impl ::protobuf::Clear for GeometryRequest_AffineTransformParams { + fn clear(&mut self) { + self.geodetic = false; + self.x_offset = 0.; + self.y_offset = 0.; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryRequest_AffineTransformParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryRequest_AffineTransformParams { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeodeticInverse { + // message fields + pub az12: f64, + pub az21: f64, + pub distance: f64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeodeticInverse { + fn default() -> &'a GeodeticInverse { + ::default_instance() + } +} + +impl GeodeticInverse { + pub fn new() -> GeodeticInverse { + ::std::default::Default::default() + } + + // double az12 = 1; + + + pub fn get_az12(&self) -> f64 { + self.az12 + } + pub fn clear_az12(&mut self) { + self.az12 = 0.; + } + + // Param is passed by value, moved + pub fn set_az12(&mut self, v: f64) { + self.az12 = v; + } + + // double az21 = 2; + + + pub fn get_az21(&self) -> f64 { + self.az21 + } + pub fn clear_az21(&mut self) { + self.az21 = 0.; + } + + // Param is passed by value, moved + pub fn set_az21(&mut self, v: f64) { + self.az21 = v; + } + + // double distance = 3; + + + pub fn get_distance(&self) -> f64 { + self.distance + } + pub fn clear_distance(&mut self) { + self.distance = 0.; + } + + // Param is passed by value, moved + pub fn set_distance(&mut self, v: f64) { + self.distance = v; + } +} + +impl ::protobuf::Message for GeodeticInverse { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.az12 = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.az21 = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.distance = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.az12 != 0. { + my_size += 9; + } + if self.az21 != 0. { + my_size += 9; + } + if self.distance != 0. { + my_size += 9; + } + 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.az12 != 0. { + os.write_double(1, self.az12)?; + } + if self.az21 != 0. { + os.write_double(2, self.az21)?; + } + if self.distance != 0. { + os.write_double(3, self.distance)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeodeticInverse { + GeodeticInverse::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::ProtobufTypeDouble>( + "az12", + |m: &GeodeticInverse| { &m.az12 }, + |m: &mut GeodeticInverse| { &mut m.az12 }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "az21", + |m: &GeodeticInverse| { &m.az21 }, + |m: &mut GeodeticInverse| { &mut m.az21 }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "distance", + |m: &GeodeticInverse| { &m.distance }, + |m: &mut GeodeticInverse| { &mut m.distance }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeodeticInverse", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeodeticInverse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeodeticInverse, + }; + unsafe { + instance.get(GeodeticInverse::new) + } + } +} + +impl ::protobuf::Clear for GeodeticInverse { + fn clear(&mut self) { + self.az12 = 0.; + self.az21 = 0.; + self.distance = 0.; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeodeticInverse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeodeticInverse { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct GeometryResponse { + // message fields + pub geometry: ::protobuf::SingularPtrField, + pub spatial_relationship: bool, + pub measure: f64, + pub relate_map: ::std::collections::HashMap, + pub envelope: ::protobuf::SingularPtrField, + pub geodetic_inverse: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GeometryResponse { + fn default() -> &'a GeometryResponse { + ::default_instance() + } +} + +impl GeometryResponse { + pub fn new() -> GeometryResponse { + ::std::default::Default::default() + } + + // .epl.protobuf.GeometryData geometry = 1; + + + pub fn get_geometry(&self) -> &GeometryData { + self.geometry.as_ref().unwrap_or_else(|| GeometryData::default_instance()) + } + pub fn clear_geometry(&mut self) { + self.geometry.clear(); + } + + pub fn has_geometry(&self) -> bool { + self.geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry(&mut self, v: GeometryData) { + self.geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry(&mut self) -> &mut GeometryData { + if self.geometry.is_none() { + self.geometry.set_default(); + } + self.geometry.as_mut().unwrap() + } + + // Take field + pub fn take_geometry(&mut self) -> GeometryData { + self.geometry.take().unwrap_or_else(|| GeometryData::new()) + } + + // bool spatial_relationship = 2; + + + pub fn get_spatial_relationship(&self) -> bool { + self.spatial_relationship + } + pub fn clear_spatial_relationship(&mut self) { + self.spatial_relationship = false; + } + + // Param is passed by value, moved + pub fn set_spatial_relationship(&mut self, v: bool) { + self.spatial_relationship = v; + } + + // double measure = 3; + + + pub fn get_measure(&self) -> f64 { + self.measure + } + pub fn clear_measure(&mut self) { + self.measure = 0.; + } + + // Param is passed by value, moved + pub fn set_measure(&mut self, v: f64) { + self.measure = v; + } + + // repeated .epl.protobuf.GeometryResponse.RelateMapEntry relate_map = 4; + + + pub fn get_relate_map(&self) -> &::std::collections::HashMap { + &self.relate_map + } + pub fn clear_relate_map(&mut self) { + self.relate_map.clear(); + } + + // Param is passed by value, moved + pub fn set_relate_map(&mut self, v: ::std::collections::HashMap) { + self.relate_map = v; + } + + // Mutable pointer to the field. + pub fn mut_relate_map(&mut self) -> &mut ::std::collections::HashMap { + &mut self.relate_map + } + + // Take field + pub fn take_relate_map(&mut self) -> ::std::collections::HashMap { + ::std::mem::replace(&mut self.relate_map, ::std::collections::HashMap::new()) + } + + // .epl.protobuf.EnvelopeData envelope = 5; + + + pub fn get_envelope(&self) -> &EnvelopeData { + self.envelope.as_ref().unwrap_or_else(|| EnvelopeData::default_instance()) + } + pub fn clear_envelope(&mut self) { + self.envelope.clear(); + } + + pub fn has_envelope(&self) -> bool { + self.envelope.is_some() + } + + // Param is passed by value, moved + pub fn set_envelope(&mut self, v: EnvelopeData) { + self.envelope = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_envelope(&mut self) -> &mut EnvelopeData { + if self.envelope.is_none() { + self.envelope.set_default(); + } + self.envelope.as_mut().unwrap() + } + + // Take field + pub fn take_envelope(&mut self) -> EnvelopeData { + self.envelope.take().unwrap_or_else(|| EnvelopeData::new()) + } + + // .epl.protobuf.GeodeticInverse geodetic_inverse = 6; + + + pub fn get_geodetic_inverse(&self) -> &GeodeticInverse { + self.geodetic_inverse.as_ref().unwrap_or_else(|| GeodeticInverse::default_instance()) + } + pub fn clear_geodetic_inverse(&mut self) { + self.geodetic_inverse.clear(); + } + + pub fn has_geodetic_inverse(&self) -> bool { + self.geodetic_inverse.is_some() + } + + // Param is passed by value, moved + pub fn set_geodetic_inverse(&mut self, v: GeodeticInverse) { + self.geodetic_inverse = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geodetic_inverse(&mut self) -> &mut GeodeticInverse { + if self.geodetic_inverse.is_none() { + self.geodetic_inverse.set_default(); + } + self.geodetic_inverse.as_mut().unwrap() + } + + // Take field + pub fn take_geodetic_inverse(&mut self) -> GeodeticInverse { + self.geodetic_inverse.take().unwrap_or_else(|| GeodeticInverse::new()) + } +} + +impl ::protobuf::Message for GeometryResponse { + fn is_initialized(&self) -> bool { + for v in &self.geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.envelope { + if !v.is_initialized() { + return false; + } + }; + for v in &self.geodetic_inverse { + 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.geometry)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.spatial_relationship = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.measure = tmp; + }, + 4 => { + ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeBool>(wire_type, is, &mut self.relate_map)?; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.envelope)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.geodetic_inverse)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.spatial_relationship != false { + my_size += 2; + } + if self.measure != 0. { + my_size += 9; + } + my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeBool>(4, &self.relate_map); + if let Some(ref v) = self.envelope.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.geodetic_inverse.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.geometry.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 self.spatial_relationship != false { + os.write_bool(2, self.spatial_relationship)?; + } + if self.measure != 0. { + os.write_double(3, self.measure)?; + } + ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeBool>(4, &self.relate_map, os)?; + if let Some(ref v) = self.envelope.as_ref() { + os.write_tag(5, ::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.geodetic_inverse.as_ref() { + os.write_tag(6, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GeometryResponse { + GeometryResponse::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>( + "geometry", + |m: &GeometryResponse| { &m.geometry }, + |m: &mut GeometryResponse| { &mut m.geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "spatial_relationship", + |m: &GeometryResponse| { &m.spatial_relationship }, + |m: &mut GeometryResponse| { &mut m.spatial_relationship }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "measure", + |m: &GeometryResponse| { &m.measure }, + |m: &mut GeometryResponse| { &mut m.measure }, + )); + fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeBool>( + "relate_map", + |m: &GeometryResponse| { &m.relate_map }, + |m: &mut GeometryResponse| { &mut m.relate_map }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "envelope", + |m: &GeometryResponse| { &m.envelope }, + |m: &mut GeometryResponse| { &mut m.envelope }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "geodetic_inverse", + |m: &GeometryResponse| { &m.geodetic_inverse }, + |m: &mut GeometryResponse| { &mut m.geodetic_inverse }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "GeometryResponse", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static GeometryResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const GeometryResponse, + }; + unsafe { + instance.get(GeometryResponse::new) + } + } +} + +impl ::protobuf::Clear for GeometryResponse { + fn clear(&mut self) { + self.geometry.clear(); + self.spatial_relationship = false; + self.measure = 0.; + self.relate_map.clear(); + self.envelope.clear(); + self.geodetic_inverse.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for GeometryResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for GeometryResponse { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct FileRequestChunk { + // message fields + pub nested_request: ::protobuf::SingularPtrField, + pub result_encoding_type: Encoding, + pub input_sr: ::protobuf::SingularPtrField, + pub result_sr: ::protobuf::SingularPtrField, + pub data: ::std::vec::Vec, + pub size: i64, + pub offset: i64, + pub file_name: ::std::string::String, + pub is_last_chunk: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FileRequestChunk { + fn default() -> &'a FileRequestChunk { + ::default_instance() + } +} + +impl FileRequestChunk { + pub fn new() -> FileRequestChunk { + ::std::default::Default::default() + } + + // .epl.protobuf.GeometryRequest nested_request = 1; + + + pub fn get_nested_request(&self) -> &GeometryRequest { + self.nested_request.as_ref().unwrap_or_else(|| GeometryRequest::default_instance()) + } + pub fn clear_nested_request(&mut self) { + self.nested_request.clear(); + } + + pub fn has_nested_request(&self) -> bool { + self.nested_request.is_some() + } + + // Param is passed by value, moved + pub fn set_nested_request(&mut self, v: GeometryRequest) { + self.nested_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_nested_request(&mut self) -> &mut GeometryRequest { + if self.nested_request.is_none() { + self.nested_request.set_default(); + } + self.nested_request.as_mut().unwrap() + } + + // Take field + pub fn take_nested_request(&mut self) -> GeometryRequest { + self.nested_request.take().unwrap_or_else(|| GeometryRequest::new()) + } + + // .epl.protobuf.Encoding result_encoding_type = 2; + + + pub fn get_result_encoding_type(&self) -> Encoding { + self.result_encoding_type + } + pub fn clear_result_encoding_type(&mut self) { + self.result_encoding_type = Encoding::UNKNOWN_ENCODING; + } + + // Param is passed by value, moved + pub fn set_result_encoding_type(&mut self, v: Encoding) { + self.result_encoding_type = v; + } + + // .epl.protobuf.SpatialReferenceData input_sr = 3; + + + pub fn get_input_sr(&self) -> &SpatialReferenceData { + self.input_sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_input_sr(&mut self) { + self.input_sr.clear(); + } + + pub fn has_input_sr(&self) -> bool { + self.input_sr.is_some() + } + + // Param is passed by value, moved + pub fn set_input_sr(&mut self, v: SpatialReferenceData) { + self.input_sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_input_sr(&mut self) -> &mut SpatialReferenceData { + if self.input_sr.is_none() { + self.input_sr.set_default(); + } + self.input_sr.as_mut().unwrap() + } + + // Take field + pub fn take_input_sr(&mut self) -> SpatialReferenceData { + self.input_sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // .epl.protobuf.SpatialReferenceData result_sr = 5; + + + pub fn get_result_sr(&self) -> &SpatialReferenceData { + self.result_sr.as_ref().unwrap_or_else(|| SpatialReferenceData::default_instance()) + } + pub fn clear_result_sr(&mut self) { + self.result_sr.clear(); + } + + pub fn has_result_sr(&self) -> bool { + self.result_sr.is_some() + } + + // Param is passed by value, moved + pub fn set_result_sr(&mut self, v: SpatialReferenceData) { + self.result_sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_result_sr(&mut self) -> &mut SpatialReferenceData { + if self.result_sr.is_none() { + self.result_sr.set_default(); + } + self.result_sr.as_mut().unwrap() + } + + // Take field + pub fn take_result_sr(&mut self) -> SpatialReferenceData { + self.result_sr.take().unwrap_or_else(|| SpatialReferenceData::new()) + } + + // bytes data = 6; + + + pub fn get_data(&self) -> &[u8] { + &self.data + } + pub fn clear_data(&mut self) { + self.data.clear(); + } + + // Param is passed by value, moved + pub fn set_data(&mut self, v: ::std::vec::Vec) { + self.data = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_data(&mut self) -> &mut ::std::vec::Vec { + &mut self.data + } + + // Take field + pub fn take_data(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) + } + + // int64 size = 7; + + + pub fn get_size(&self) -> i64 { + self.size + } + pub fn clear_size(&mut self) { + self.size = 0; + } + + // Param is passed by value, moved + pub fn set_size(&mut self, v: i64) { + self.size = v; + } + + // int64 offset = 8; + + + pub fn get_offset(&self) -> i64 { + self.offset + } + pub fn clear_offset(&mut self) { + self.offset = 0; + } + + // Param is passed by value, moved + pub fn set_offset(&mut self, v: i64) { + self.offset = v; + } + + // string file_name = 9; + + + pub fn get_file_name(&self) -> &str { + &self.file_name + } + pub fn clear_file_name(&mut self) { + self.file_name.clear(); + } + + // Param is passed by value, moved + pub fn set_file_name(&mut self, v: ::std::string::String) { + self.file_name = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_file_name(&mut self) -> &mut ::std::string::String { + &mut self.file_name + } + + // Take field + pub fn take_file_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.file_name, ::std::string::String::new()) + } + + // bool is_last_chunk = 10; + + + pub fn get_is_last_chunk(&self) -> bool { + self.is_last_chunk + } + pub fn clear_is_last_chunk(&mut self) { + self.is_last_chunk = false; + } + + // Param is passed by value, moved + pub fn set_is_last_chunk(&mut self, v: bool) { + self.is_last_chunk = v; + } +} + +impl ::protobuf::Message for FileRequestChunk { + fn is_initialized(&self) -> bool { + for v in &self.nested_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.input_sr { + if !v.is_initialized() { + return false; + } + }; + for v in &self.result_sr { + 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.nested_request)?; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.result_encoding_type, 2, &mut self.unknown_fields)? + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.input_sr)?; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.result_sr)?; + }, + 6 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; + }, + 7 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.size = tmp; + }, + 8 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.offset = tmp; + }, + 9 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.file_name)?; + }, + 10 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.is_last_chunk = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.nested_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.result_encoding_type != Encoding::UNKNOWN_ENCODING { + my_size += ::protobuf::rt::enum_size(2, self.result_encoding_type); + } + if let Some(ref v) = self.input_sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.result_sr.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if !self.data.is_empty() { + my_size += ::protobuf::rt::bytes_size(6, &self.data); + } + if self.size != 0 { + my_size += ::protobuf::rt::value_size(7, self.size, ::protobuf::wire_format::WireTypeVarint); + } + if self.offset != 0 { + my_size += ::protobuf::rt::value_size(8, self.offset, ::protobuf::wire_format::WireTypeVarint); + } + if !self.file_name.is_empty() { + my_size += ::protobuf::rt::string_size(9, &self.file_name); + } + if self.is_last_chunk != false { + my_size += 2; + } + 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.nested_request.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 self.result_encoding_type != Encoding::UNKNOWN_ENCODING { + os.write_enum(2, self.result_encoding_type.value())?; + } + if let Some(ref v) = self.input_sr.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 Some(ref v) = self.result_sr.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.data.is_empty() { + os.write_bytes(6, &self.data)?; + } + if self.size != 0 { + os.write_int64(7, self.size)?; + } + if self.offset != 0 { + os.write_int64(8, self.offset)?; + } + if !self.file_name.is_empty() { + os.write_string(9, &self.file_name)?; + } + if self.is_last_chunk != false { + os.write_bool(10, self.is_last_chunk)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FileRequestChunk { + FileRequestChunk::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>( + "nested_request", + |m: &FileRequestChunk| { &m.nested_request }, + |m: &mut FileRequestChunk| { &mut m.nested_request }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "result_encoding_type", + |m: &FileRequestChunk| { &m.result_encoding_type }, + |m: &mut FileRequestChunk| { &mut m.result_encoding_type }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "input_sr", + |m: &FileRequestChunk| { &m.input_sr }, + |m: &mut FileRequestChunk| { &mut m.input_sr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "result_sr", + |m: &FileRequestChunk| { &m.result_sr }, + |m: &mut FileRequestChunk| { &mut m.result_sr }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &FileRequestChunk| { &m.data }, + |m: &mut FileRequestChunk| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "size", + |m: &FileRequestChunk| { &m.size }, + |m: &mut FileRequestChunk| { &mut m.size }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "offset", + |m: &FileRequestChunk| { &m.offset }, + |m: &mut FileRequestChunk| { &mut m.offset }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "file_name", + |m: &FileRequestChunk| { &m.file_name }, + |m: &mut FileRequestChunk| { &mut m.file_name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "is_last_chunk", + |m: &FileRequestChunk| { &m.is_last_chunk }, + |m: &mut FileRequestChunk| { &mut m.is_last_chunk }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "FileRequestChunk", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static FileRequestChunk { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const FileRequestChunk, + }; + unsafe { + instance.get(FileRequestChunk::new) + } + } +} + +impl ::protobuf::Clear for FileRequestChunk { + fn clear(&mut self) { + self.nested_request.clear(); + self.result_encoding_type = Encoding::UNKNOWN_ENCODING; + self.input_sr.clear(); + self.result_sr.clear(); + self.data.clear(); + self.size = 0; + self.offset = 0; + self.file_name.clear(); + self.is_last_chunk = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for FileRequestChunk { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for FileRequestChunk { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum FileRequestChunk_FileType { + SHAPEFILE = 0, +} + +impl ::protobuf::ProtobufEnum for FileRequestChunk_FileType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(FileRequestChunk_FileType::SHAPEFILE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [FileRequestChunk_FileType] = &[ + FileRequestChunk_FileType::SHAPEFILE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("FileRequestChunk_FileType", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for FileRequestChunk_FileType { +} + +impl ::std::default::Default for FileRequestChunk_FileType { + fn default() -> Self { + FileRequestChunk_FileType::SHAPEFILE + } +} + +impl ::protobuf::reflect::ProtobufValue for FileRequestChunk_FileType { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum SimpleState { + SIMPLE_UNKNOWN = 0, + WEAK_SIMPLE = 1, + STRONG_SIMPLE = 2, + NON_SIMPLE = 3, + STRUCTURE_FLAW = 4, + DEGENERATE_SEGMENTS = 5, + CLUSTERING = 6, + CRACKING = 7, + CROSS_OVER = 8, + RING_ORIENTATION = 9, +} + +impl ::protobuf::ProtobufEnum for SimpleState { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(SimpleState::SIMPLE_UNKNOWN), + 1 => ::std::option::Option::Some(SimpleState::WEAK_SIMPLE), + 2 => ::std::option::Option::Some(SimpleState::STRONG_SIMPLE), + 3 => ::std::option::Option::Some(SimpleState::NON_SIMPLE), + 4 => ::std::option::Option::Some(SimpleState::STRUCTURE_FLAW), + 5 => ::std::option::Option::Some(SimpleState::DEGENERATE_SEGMENTS), + 6 => ::std::option::Option::Some(SimpleState::CLUSTERING), + 7 => ::std::option::Option::Some(SimpleState::CRACKING), + 8 => ::std::option::Option::Some(SimpleState::CROSS_OVER), + 9 => ::std::option::Option::Some(SimpleState::RING_ORIENTATION), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [SimpleState] = &[ + SimpleState::SIMPLE_UNKNOWN, + SimpleState::WEAK_SIMPLE, + SimpleState::STRONG_SIMPLE, + SimpleState::NON_SIMPLE, + SimpleState::STRUCTURE_FLAW, + SimpleState::DEGENERATE_SEGMENTS, + SimpleState::CLUSTERING, + SimpleState::CRACKING, + SimpleState::CROSS_OVER, + SimpleState::RING_ORIENTATION, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("SimpleState", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for SimpleState { +} + +impl ::std::default::Default for SimpleState { + fn default() -> Self { + SimpleState::SIMPLE_UNKNOWN + } +} + +impl ::protobuf::reflect::ProtobufValue for SimpleState { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Encoding { + UNKNOWN_ENCODING = 0, + WKB = 1, + WKT = 2, + GEOJSON = 3, + ESRI_SHAPE = 4, + ENVELOPE = 5, +} + +impl ::protobuf::ProtobufEnum for Encoding { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Encoding::UNKNOWN_ENCODING), + 1 => ::std::option::Option::Some(Encoding::WKB), + 2 => ::std::option::Option::Some(Encoding::WKT), + 3 => ::std::option::Option::Some(Encoding::GEOJSON), + 4 => ::std::option::Option::Some(Encoding::ESRI_SHAPE), + 5 => ::std::option::Option::Some(Encoding::ENVELOPE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Encoding] = &[ + Encoding::UNKNOWN_ENCODING, + Encoding::WKB, + Encoding::WKT, + Encoding::GEOJSON, + Encoding::ESRI_SHAPE, + Encoding::ENVELOPE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Encoding", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Encoding { +} + +impl ::std::default::Default for Encoding { + fn default() -> Self { + Encoding::UNKNOWN_ENCODING + } +} + +impl ::protobuf::reflect::ProtobufValue for Encoding { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum OperatorType { + UNKNOWN_OPERATOR = 0, + PROJECT = 1, + EXPORT_TO_JSON = 2, + IMPORT_FROM_JSON = 3, + EXPORT_TO_ESRI_SHAPE = 4, + IMPORT_FROM_ESRI_SHAPE = 5, + UNION = 6, + DIFFERENCE = 7, + PROXIMITY_2D = 8, + RELATE = 9, + EQUALS = 10, + DISJOINT = 11, + INTERSECTS = 12, + WITHIN = 13, + CONTAINS = 14, + CROSSES = 15, + TOUCHES = 16, + OVERLAPS = 17, + BUFFER = 18, + DISTANCE = 19, + INTERSECTION = 20, + CLIP = 21, + CUT = 22, + DENSIFY_BY_LENGTH = 23, + GEODESIC_BUFFER = 26, + GEODETIC_DENSIFY_BY_LENGTH = 27, + GEODETIC_AREA = 30, + SIMPLIFY = 31, + SIMPLIFY_OGC = 32, + OFFSET = 33, + GENERALIZE = 34, + GENERALIZE_BY_AREA = 35, + EXPORT_TO_WKB = 36, + IMPORT_FROM_WKB = 37, + EXPORT_TO_WKT = 38, + IMPORT_FROM_WKT = 39, + IMPORT_FROM_GEOJSON = 40, + EXPORT_TO_GEOJSON = 41, + SYMMETRIC_DIFFERENCE = 42, + CONVEX_HULL = 43, + BOUNDARY = 44, + RANDOM_POINTS = 45, + ENCLOSING_CIRCLE = 46, + AFFINE_TRANSFORM = 47, + GEODETIC_LENGTH = 48, + GEODETIC_INVERSE = 49, +} + +impl ::protobuf::ProtobufEnum for OperatorType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(OperatorType::UNKNOWN_OPERATOR), + 1 => ::std::option::Option::Some(OperatorType::PROJECT), + 2 => ::std::option::Option::Some(OperatorType::EXPORT_TO_JSON), + 3 => ::std::option::Option::Some(OperatorType::IMPORT_FROM_JSON), + 4 => ::std::option::Option::Some(OperatorType::EXPORT_TO_ESRI_SHAPE), + 5 => ::std::option::Option::Some(OperatorType::IMPORT_FROM_ESRI_SHAPE), + 6 => ::std::option::Option::Some(OperatorType::UNION), + 7 => ::std::option::Option::Some(OperatorType::DIFFERENCE), + 8 => ::std::option::Option::Some(OperatorType::PROXIMITY_2D), + 9 => ::std::option::Option::Some(OperatorType::RELATE), + 10 => ::std::option::Option::Some(OperatorType::EQUALS), + 11 => ::std::option::Option::Some(OperatorType::DISJOINT), + 12 => ::std::option::Option::Some(OperatorType::INTERSECTS), + 13 => ::std::option::Option::Some(OperatorType::WITHIN), + 14 => ::std::option::Option::Some(OperatorType::CONTAINS), + 15 => ::std::option::Option::Some(OperatorType::CROSSES), + 16 => ::std::option::Option::Some(OperatorType::TOUCHES), + 17 => ::std::option::Option::Some(OperatorType::OVERLAPS), + 18 => ::std::option::Option::Some(OperatorType::BUFFER), + 19 => ::std::option::Option::Some(OperatorType::DISTANCE), + 20 => ::std::option::Option::Some(OperatorType::INTERSECTION), + 21 => ::std::option::Option::Some(OperatorType::CLIP), + 22 => ::std::option::Option::Some(OperatorType::CUT), + 23 => ::std::option::Option::Some(OperatorType::DENSIFY_BY_LENGTH), + 26 => ::std::option::Option::Some(OperatorType::GEODESIC_BUFFER), + 27 => ::std::option::Option::Some(OperatorType::GEODETIC_DENSIFY_BY_LENGTH), + 30 => ::std::option::Option::Some(OperatorType::GEODETIC_AREA), + 31 => ::std::option::Option::Some(OperatorType::SIMPLIFY), + 32 => ::std::option::Option::Some(OperatorType::SIMPLIFY_OGC), + 33 => ::std::option::Option::Some(OperatorType::OFFSET), + 34 => ::std::option::Option::Some(OperatorType::GENERALIZE), + 35 => ::std::option::Option::Some(OperatorType::GENERALIZE_BY_AREA), + 36 => ::std::option::Option::Some(OperatorType::EXPORT_TO_WKB), + 37 => ::std::option::Option::Some(OperatorType::IMPORT_FROM_WKB), + 38 => ::std::option::Option::Some(OperatorType::EXPORT_TO_WKT), + 39 => ::std::option::Option::Some(OperatorType::IMPORT_FROM_WKT), + 40 => ::std::option::Option::Some(OperatorType::IMPORT_FROM_GEOJSON), + 41 => ::std::option::Option::Some(OperatorType::EXPORT_TO_GEOJSON), + 42 => ::std::option::Option::Some(OperatorType::SYMMETRIC_DIFFERENCE), + 43 => ::std::option::Option::Some(OperatorType::CONVEX_HULL), + 44 => ::std::option::Option::Some(OperatorType::BOUNDARY), + 45 => ::std::option::Option::Some(OperatorType::RANDOM_POINTS), + 46 => ::std::option::Option::Some(OperatorType::ENCLOSING_CIRCLE), + 47 => ::std::option::Option::Some(OperatorType::AFFINE_TRANSFORM), + 48 => ::std::option::Option::Some(OperatorType::GEODETIC_LENGTH), + 49 => ::std::option::Option::Some(OperatorType::GEODETIC_INVERSE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [OperatorType] = &[ + OperatorType::UNKNOWN_OPERATOR, + OperatorType::PROJECT, + OperatorType::EXPORT_TO_JSON, + OperatorType::IMPORT_FROM_JSON, + OperatorType::EXPORT_TO_ESRI_SHAPE, + OperatorType::IMPORT_FROM_ESRI_SHAPE, + OperatorType::UNION, + OperatorType::DIFFERENCE, + OperatorType::PROXIMITY_2D, + OperatorType::RELATE, + OperatorType::EQUALS, + OperatorType::DISJOINT, + OperatorType::INTERSECTS, + OperatorType::WITHIN, + OperatorType::CONTAINS, + OperatorType::CROSSES, + OperatorType::TOUCHES, + OperatorType::OVERLAPS, + OperatorType::BUFFER, + OperatorType::DISTANCE, + OperatorType::INTERSECTION, + OperatorType::CLIP, + OperatorType::CUT, + OperatorType::DENSIFY_BY_LENGTH, + OperatorType::GEODESIC_BUFFER, + OperatorType::GEODETIC_DENSIFY_BY_LENGTH, + OperatorType::GEODETIC_AREA, + OperatorType::SIMPLIFY, + OperatorType::SIMPLIFY_OGC, + OperatorType::OFFSET, + OperatorType::GENERALIZE, + OperatorType::GENERALIZE_BY_AREA, + OperatorType::EXPORT_TO_WKB, + OperatorType::IMPORT_FROM_WKB, + OperatorType::EXPORT_TO_WKT, + OperatorType::IMPORT_FROM_WKT, + OperatorType::IMPORT_FROM_GEOJSON, + OperatorType::EXPORT_TO_GEOJSON, + OperatorType::SYMMETRIC_DIFFERENCE, + OperatorType::CONVEX_HULL, + OperatorType::BOUNDARY, + OperatorType::RANDOM_POINTS, + OperatorType::ENCLOSING_CIRCLE, + OperatorType::AFFINE_TRANSFORM, + OperatorType::GEODETIC_LENGTH, + OperatorType::GEODETIC_INVERSE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("OperatorType", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for OperatorType { +} + +impl ::std::default::Default for OperatorType { + fn default() -> Self { + OperatorType::UNKNOWN_OPERATOR + } +} + +impl ::protobuf::reflect::ProtobufValue for OperatorType { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x1bepl/protobuf/geometry.proto\x12\x0cepl.protobuf\"\xd0\x02\n\x0cGeo\ + metryData\x12\x1f\n\x0bgeometry_id\x18\x01\x20\x01(\x04R\ngeometryId\x12\ + \x1d\n\nfeature_id\x18\x02\x20\x01(\tR\tfeatureId\x12\x10\n\x03wkt\x18\ + \x03\x20\x01(\tR\x03wkt\x12\x18\n\x07geojson\x18\x04\x20\x01(\tR\x07geoj\ + son\x12\x10\n\x03wkb\x18\x05\x20\x01(\x0cR\x03wkb\x12\x1d\n\nesri_shape\ + \x18\x06\x20\x01(\x0cR\tesriShape\x122\n\x02sr\x18\x07\x20\x01(\x0b2\".e\ + pl.protobuf.SpatialReferenceDataR\x02sr\x126\n\x08envelope\x18\r\x20\x01\ + (\x0b2\x1a.epl.protobuf.EnvelopeDataR\x08envelope\x121\n\x06simple\x18\ + \x0e\x20\x01(\x0e2\x19.epl.protobuf.SimpleStateR\x06simpleJ\x04\x08\x08\ + \x10\r\"\xc5\x02\n\x14SpatialReferenceData\x12\x12\n\x04wkid\x18\x01\x20\ + \x01(\x05R\x04wkid\x12\x14\n\x05proj4\x18\x02\x20\x01(\tR\x05proj4\x12A\ + \n\x06custom\x18\x03\x20\x01(\x0b2).epl.protobuf.SpatialReferenceData.Cu\ + stomR\x06custom\x12\x10\n\x03wkt\x18\x04\x20\x01(\tR\x03wkt\x12\x1b\n\te\ + sri_wkid\x18\x05\x20\x01(\x05R\x08esriWkid\x1av\n\x06Custom\x12\x13\n\ + \x05lon_0\x18\x01\x20\x01(\x01R\x04lon0\x12\x13\n\x05lat_0\x18\x02\x20\ + \x01(\x01R\x04lat0\x12B\n\x07cs_type\x18\x03\x20\x01(\x0e2).epl.protobuf\ + .SpatialReferenceData.CSTypeR\x06csType\"\x19\n\x06CSType\x12\x0f\n\x0bL\ + AMBERT_AZI\x10\0\"\xba\x01\n\x0cEnvelopeData\x12\x12\n\x04xmin\x18\x01\ + \x20\x01(\x01R\x04xmin\x12\x12\n\x04ymin\x18\x02\x20\x01(\x01R\x04ymin\ + \x12\x12\n\x04xmax\x18\x03\x20\x01(\x01R\x04xmax\x12\x12\n\x04ymax\x18\ + \x04\x20\x01(\x01R\x04ymax\x122\n\x02sr\x18\x05\x20\x01(\x0b2\".epl.prot\ + obuf.SpatialReferenceDataR\x02sr\x12\x12\n\x04zmin\x18\x06\x20\x01(\x01R\ + \x04zmin\x12\x12\n\x04zmax\x18\x07\x20\x01(\x01R\x04zmax\"\xeb\x19\n\x0f\ + GeometryRequest\x126\n\x08geometry\x18\x01\x20\x01(\x0b2\x1a.epl.protobu\ + f.GeometryDataR\x08geometry\x12?\n\rleft_geometry\x18\x02\x20\x01(\x0b2\ + \x1a.epl.protobuf.GeometryDataR\x0cleftGeometry\x12H\n\x10geometry_reque\ + st\x18\x03\x20\x01(\x0b2\x1d.epl.protobuf.GeometryRequestR\x0fgeometryRe\ + quest\x12Q\n\x15left_geometry_request\x18\x04\x20\x01(\x0b2\x1d.epl.prot\ + obuf.GeometryRequestR\x13leftGeometryRequest\x12A\n\x0eright_geometry\ + \x18\x05\x20\x01(\x0b2\x1a.epl.protobuf.GeometryDataR\rrightGeometry\x12\ + S\n\x16right_geometry_request\x18\x06\x20\x01(\x0b2\x1d.epl.protobuf.Geo\ + metryRequestR\x14rightGeometryRequest\x126\n\x08operator\x18\x07\x20\x01\ + (\x0e2\x1a.epl.protobuf.OperatorTypeR\x08operator\x12?\n\x0fresult_encod\ + ing\x18\x08\x20\x01(\x0e2\x16.epl.protobuf.EncodingR\x0eresultEncoding\ + \x12E\n\x0coperation_sr\x18\t\x20\x01(\x0b2\".epl.protobuf.SpatialRefere\ + nceDataR\x0boperationSr\x12?\n\tresult_sr\x18\n\x20\x01(\x0b2\".epl.prot\ + obuf.SpatialReferenceDataR\x08resultSr\x12O\n\rbuffer_params\x18\x0b\x20\ + \x01(\x0b2*.epl.protobuf.GeometryRequest.BufferParamsR\x0cbufferParams\ + \x12O\n\rconvex_params\x18\x0c\x20\x01(\x0b2*.epl.protobuf.GeometryReque\ + st.ConvexParamsR\x0cconvexParams\x12O\n\rrelate_params\x18\r\x20\x01(\ + \x0b2*.epl.protobuf.GeometryRequest.RelateParamsR\x0crelateParams\x12b\n\ + \x14random_points_params\x18\x0e\x20\x01(\x0b20.epl.protobuf.GeometryReq\ + uest.RandomPointsParamsR\x12randomPointsParams\x12[\n\x11generalize_para\ + ms\x18\x0f\x20\x01(\x0b2..epl.protobuf.GeometryRequest.GeneralizeParamsR\ + \x10generalizeParams\x12a\n\x13intersection_params\x18\x10\x20\x01(\x0b2\ + 0.epl.protobuf.GeometryRequest.IntersectionParamsR\x12intersectionParams\ + \x12O\n\roffset_params\x18\x11\x20\x01(\x0b2*.epl.protobuf.GeometryReque\ + st.OffsetParamsR\x0coffsetParams\x12F\n\ncut_params\x18\x12\x20\x01(\x0b\ + 2'.epl.protobuf.GeometryRequest.CutParamsR\tcutParams\x12I\n\x0bclip_par\ + ams\x18\x13\x20\x01(\x0b2(.epl.protobuf.GeometryRequest.ClipParamsR\ncli\ + pParams\x12R\n\x0edensify_params\x18\x14\x20\x01(\x0b2+.epl.protobuf.Geo\ + metryRequest.DensifyParamsR\rdensifyParams\x12U\n\x0fsimplify_params\x18\ + \x15\x20\x01(\x0b2,.epl.protobuf.GeometryRequest.SimplifyParamsR\x0esimp\ + lifyParams\x12o\n\x19generalize_by_area_params\x18\x16\x20\x01(\x0b24.ep\ + l.protobuf.GeometryRequest.GeneralizeByAreaParamsR\x16generalizeByAreaPa\ + rams\x12k\n\x17affine_transform_params\x18\x17\x20\x01(\x0b23.epl.protob\ + uf.GeometryRequest.AffineTransformParamsR\x15affineTransformParams\x1a\ + \xb0\x01\n\x0cBufferParams\x12\x1a\n\x08distance\x18\x01\x20\x01(\x01R\ + \x08distance\x12#\n\rmax_deviation\x18\x02\x20\x01(\x01R\x0cmaxDeviation\ + \x12!\n\x0cunion_result\x18\x03\x20\x01(\x08R\x0bunionResult\x12<\n\x1bm\ + ax_vertices_in_full_circle\x18\x04\x20\x01(\x05R\x17maxVerticesInFullCir\ + cle\x1a\xb8\x01\n\x14GeodeticBufferParams\x12\x1a\n\x08distance\x18\x01\ + \x20\x01(\x01R\x08distance\x12#\n\rmax_deviation\x18\x02\x20\x01(\x01R\ + \x0cmaxDeviation\x12!\n\x0cunion_result\x18\x03\x20\x01(\x08R\x0bunionRe\ + sult\x12<\n\x1bmax_vertices_in_full_circle\x18\x04\x20\x01(\x05R\x17maxV\ + erticesInFullCircle\x1a$\n\x0cConvexParams\x12\x14\n\x05merge\x18\x01\ + \x20\x01(\x08R\x05merge\x1a%\n\x0cRelateParams\x12\x15\n\x06de_9im\x18\ + \x01\x20\x01(\tR\x05de9im\x1aY\n\x12RandomPointsParams\x12/\n\x14points_\ + per_square_km\x18\x01\x20\x01(\x01R\x11pointsPerSquareKm\x12\x12\n\x04se\ + ed\x18\x02\x20\x01(\x03R\x04seed\x1af\n\x10GeneralizeParams\x12#\n\rmax_\ + deviation\x18\x01\x20\x01(\x01R\x0cmaxDeviation\x12-\n\x12remove_degener\ + ates\x18\x02\x20\x01(\x08R\x11removeDegenerates\x1a\x9c\x01\n\x16General\ + izeByAreaParams\x12+\n\x11percent_reduction\x18\x01\x20\x01(\x01R\x10per\ + centReduction\x12-\n\x12remove_degenerates\x18\x02\x20\x01(\x08R\x11remo\ + veDegenerates\x12&\n\x0fmax_point_count\x18\x03\x20\x01(\x05R\rmaxPointC\ + ount\x1a;\n\x12IntersectionParams\x12%\n\x0edimension_mask\x18\x01\x20\ + \x01(\x05R\rdimensionMask\x1a\x87\x02\n\x0cOffsetParams\x12\x1a\n\x08dis\ + tance\x18\x01\x20\x01(\x01R\x08distance\x12V\n\tjoin_type\x18\x02\x20\ + \x01(\x0e29.epl.protobuf.GeometryRequest.OffsetParams.OffsetJoinTypeR\ + \x08joinType\x12\x1f\n\x0bbevel_ratio\x18\x03\x20\x01(\x01R\nbevelRatio\ + \x12#\n\rflatten_error\x18\x04\x20\x01(\x01R\x0cflattenError\"=\n\x0eOff\ + setJoinType\x12\t\n\x05ROUND\x10\0\x12\t\n\x05BEVEL\x10\x01\x12\t\n\x05M\ + ITER\x10\x02\x12\n\n\x06SQUARE\x10\x03\x1a2\n\tCutParams\x12%\n\x0econsi\ + der_touch\x18\x01\x20\x01(\x08R\rconsiderTouch\x1aD\n\nClipParams\x126\n\ + \x08envelope\x18\x01\x20\x01(\x0b2\x1a.epl.protobuf.EnvelopeDataR\x08env\ + elope\x1a.\n\rDensifyParams\x12\x1d\n\nmax_length\x18\x01\x20\x01(\x01R\ + \tmaxLength\x1a&\n\x0eSimplifyParams\x12\x14\n\x05force\x18\x01\x20\x01(\ + \x08R\x05force\x1ao\n\x15AffineTransformParams\x12\x1a\n\x08geodetic\x18\ + \x02\x20\x01(\x08R\x08geodetic\x12\x19\n\x08x_offset\x18\x03\x20\x01(\ + \x01R\x07xOffset\x12\x19\n\x08y_offset\x18\x04\x20\x01(\x01R\x07yOffsetJ\ + \x04\x08\x01\x10\x02\"U\n\x0fGeodeticInverse\x12\x12\n\x04az12\x18\x01\ + \x20\x01(\x01R\x04az12\x12\x12\n\x04az21\x18\x02\x20\x01(\x01R\x04az21\ + \x12\x1a\n\x08distance\x18\x03\x20\x01(\x01R\x08distance\"\xa5\x03\n\x10\ + GeometryResponse\x126\n\x08geometry\x18\x01\x20\x01(\x0b2\x1a.epl.protob\ + uf.GeometryDataR\x08geometry\x121\n\x14spatial_relationship\x18\x02\x20\ + \x01(\x08R\x13spatialRelationship\x12\x18\n\x07measure\x18\x03\x20\x01(\ + \x01R\x07measure\x12L\n\nrelate_map\x18\x04\x20\x03(\x0b2-.epl.protobuf.\ + GeometryResponse.RelateMapEntryR\trelateMap\x126\n\x08envelope\x18\x05\ + \x20\x01(\x0b2\x1a.epl.protobuf.EnvelopeDataR\x08envelope\x12H\n\x10geod\ + etic_inverse\x18\x06\x20\x01(\x0b2\x1d.epl.protobuf.GeodeticInverseR\x0f\ + geodeticInverse\x1a<\n\x0eRelateMapEntry\x12\x10\n\x03key\x18\x01\x20\ + \x01(\x03R\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\x08R\x05value:\x02\ + 8\x01\"\xbe\x03\n\x10FileRequestChunk\x12D\n\x0enested_request\x18\x01\ + \x20\x01(\x0b2\x1d.epl.protobuf.GeometryRequestR\rnestedRequest\x12H\n\ + \x14result_encoding_type\x18\x02\x20\x01(\x0e2\x16.epl.protobuf.Encoding\ + R\x12resultEncodingType\x12=\n\x08input_sr\x18\x03\x20\x01(\x0b2\".epl.p\ + rotobuf.SpatialReferenceDataR\x07inputSr\x12?\n\tresult_sr\x18\x05\x20\ + \x01(\x0b2\".epl.protobuf.SpatialReferenceDataR\x08resultSr\x12\x12\n\ + \x04data\x18\x06\x20\x01(\x0cR\x04data\x12\x12\n\x04size\x18\x07\x20\x01\ + (\x03R\x04size\x12\x16\n\x06offset\x18\x08\x20\x01(\x03R\x06offset\x12\ + \x1b\n\tfile_name\x18\t\x20\x01(\tR\x08fileName\x12\"\n\ris_last_chunk\ + \x18\n\x20\x01(\x08R\x0bisLastChunk\"\x19\n\x08FileType\x12\r\n\tSHAPEFI\ + LE\x10\0*\xc6\x01\n\x0bSimpleState\x12\x12\n\x0eSIMPLE_UNKNOWN\x10\0\x12\ + \x0f\n\x0bWEAK_SIMPLE\x10\x01\x12\x11\n\rSTRONG_SIMPLE\x10\x02\x12\x0e\n\ + \nNON_SIMPLE\x10\x03\x12\x12\n\x0eSTRUCTURE_FLAW\x10\x04\x12\x17\n\x13DE\ + GENERATE_SEGMENTS\x10\x05\x12\x0e\n\nCLUSTERING\x10\x06\x12\x0c\n\x08CRA\ + CKING\x10\x07\x12\x0e\n\nCROSS_OVER\x10\x08\x12\x14\n\x10RING_ORIENTATIO\ + N\x10\t*]\n\x08Encoding\x12\x14\n\x10UNKNOWN_ENCODING\x10\0\x12\x07\n\ + \x03WKB\x10\x01\x12\x07\n\x03WKT\x10\x02\x12\x0b\n\x07GEOJSON\x10\x03\ + \x12\x0e\n\nESRI_SHAPE\x10\x04\x12\x0c\n\x08ENVELOPE\x10\x05*\xcb\x06\n\ + \x0cOperatorType\x12\x14\n\x10UNKNOWN_OPERATOR\x10\0\x12\x0b\n\x07PROJEC\ + T\x10\x01\x12\x12\n\x0eEXPORT_TO_JSON\x10\x02\x12\x14\n\x10IMPORT_FROM_J\ + SON\x10\x03\x12\x18\n\x14EXPORT_TO_ESRI_SHAPE\x10\x04\x12\x1a\n\x16IMPOR\ + T_FROM_ESRI_SHAPE\x10\x05\x12\t\n\x05UNION\x10\x06\x12\x0e\n\nDIFFERENCE\ + \x10\x07\x12\x10\n\x0cPROXIMITY_2D\x10\x08\x12\n\n\x06RELATE\x10\t\x12\n\ + \n\x06EQUALS\x10\n\x12\x0c\n\x08DISJOINT\x10\x0b\x12\x0e\n\nINTERSECTS\ + \x10\x0c\x12\n\n\x06WITHIN\x10\r\x12\x0c\n\x08CONTAINS\x10\x0e\x12\x0b\n\ + \x07CROSSES\x10\x0f\x12\x0b\n\x07TOUCHES\x10\x10\x12\x0c\n\x08OVERLAPS\ + \x10\x11\x12\n\n\x06BUFFER\x10\x12\x12\x0c\n\x08DISTANCE\x10\x13\x12\x10\ + \n\x0cINTERSECTION\x10\x14\x12\x08\n\x04CLIP\x10\x15\x12\x07\n\x03CUT\ + \x10\x16\x12\x15\n\x11DENSIFY_BY_LENGTH\x10\x17\x12\x13\n\x0fGEODESIC_BU\ + FFER\x10\x1a\x12\x1e\n\x1aGEODETIC_DENSIFY_BY_LENGTH\x10\x1b\x12\x11\n\r\ + GEODETIC_AREA\x10\x1e\x12\x0c\n\x08SIMPLIFY\x10\x1f\x12\x10\n\x0cSIMPLIF\ + Y_OGC\x10\x20\x12\n\n\x06OFFSET\x10!\x12\x0e\n\nGENERALIZE\x10\"\x12\x16\ + \n\x12GENERALIZE_BY_AREA\x10#\x12\x11\n\rEXPORT_TO_WKB\x10$\x12\x13\n\ + \x0fIMPORT_FROM_WKB\x10%\x12\x11\n\rEXPORT_TO_WKT\x10&\x12\x13\n\x0fIMPO\ + RT_FROM_WKT\x10'\x12\x17\n\x13IMPORT_FROM_GEOJSON\x10(\x12\x15\n\x11EXPO\ + RT_TO_GEOJSON\x10)\x12\x18\n\x14SYMMETRIC_DIFFERENCE\x10*\x12\x0f\n\x0bC\ + ONVEX_HULL\x10+\x12\x0c\n\x08BOUNDARY\x10,\x12\x11\n\rRANDOM_POINTS\x10-\ + \x12\x14\n\x10ENCLOSING_CIRCLE\x10.\x12\x14\n\x10AFFINE_TRANSFORM\x10/\ + \x12\x13\n\x0fGEODETIC_LENGTH\x100\x12\x14\n\x10GEODETIC_INVERSE\x101BW\ + \n\x10com.epl.protobufB\rGeometryProtoP\x01Z+github.com/geo-grpc/api/gol\ + ang/epl/protobuf\xa2\x02\x04GMPBb\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() + }) + } +} diff --git a/rust/src/proto/geometry_service.rs b/rust/src/proto/geometry_service.rs new file mode 100644 index 0000000..a363c49 --- /dev/null +++ b/rust/src/proto/geometry_service.rs @@ -0,0 +1,61 @@ +// This file is generated by rust-protobuf 2.10.0. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] +//! Generated file from `epl/protobuf/geometry_service.proto` + +use protobuf::Message as Message_imported_for_functions; +use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0; + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n#epl/protobuf/geometry_service.proto\x12\x0cepl.protobuf\x1a\x1bepl/pr\ + otobuf/geometry.proto2\xa6\x04\n\x0fGeometryService\x12J\n\x07Operate\ + \x12\x1d.epl.protobuf.GeometryRequest\x1a\x1e.epl.protobuf.GeometryRespo\ + nse\"\0\x12V\n\x0fOperateBiStream\x12\x1d.epl.protobuf.GeometryRequest\ + \x1a\x1e.epl.protobuf.GeometryResponse\"\0(\x010\x01\x12Z\n\x13OperateBi\ + StreamFlow\x12\x1d.epl.protobuf.GeometryRequest\x1a\x1e.epl.protobuf.Geo\ + metryResponse\"\0(\x010\x01\x12X\n\x13OperateServerStream\x12\x1d.epl.pr\ + otobuf.GeometryRequest\x1a\x1e.epl.protobuf.GeometryResponse\"\00\x01\ + \x12X\n\x13OperateClientStream\x12\x1d.epl.protobuf.GeometryRequest\x1a\ + \x1e.epl.protobuf.GeometryResponse\"\0(\x01\x12_\n\x17FileOperateBiStrea\ + mFlow\x12\x1e.epl.protobuf.FileRequestChunk\x1a\x1e.epl.protobuf.Geometr\ + yResponse\"\0(\x010\x01B]\n\x10com.epl.protobufB\x14GeometryServiceProto\ + P\x01Z+github.com/geo-grpc/api/golang/epl/protobuf\xa2\x02\x03GMSb\x06pr\ + oto3\ +"; + +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() + }) + } +} diff --git a/rust/src/proto/geometry_service_grpc.rs b/rust/src/proto/geometry_service_grpc.rs new file mode 100644 index 0000000..9925d81 --- /dev/null +++ b/rust/src/proto/geometry_service_grpc.rs @@ -0,0 +1,171 @@ +// This file is generated. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] + +const METHOD_GEOMETRY_SERVICE_OPERATE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.GeometryService/Operate", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/epl.protobuf.GeometryService/OperateBiStream", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM_FLOW: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/epl.protobuf.GeometryService/OperateBiStreamFlow", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_GEOMETRY_SERVICE_OPERATE_SERVER_STREAM: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::ServerStreaming, + name: "/epl.protobuf.GeometryService/OperateServerStream", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_GEOMETRY_SERVICE_OPERATE_CLIENT_STREAM: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::ClientStreaming, + name: "/epl.protobuf.GeometryService/OperateClientStream", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_GEOMETRY_SERVICE_FILE_OPERATE_BI_STREAM_FLOW: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/epl.protobuf.GeometryService/FileOperateBiStreamFlow", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +#[derive(Clone)] +pub struct GeometryServiceClient { + client: ::grpcio::Client, +} + +impl GeometryServiceClient { + pub fn new(channel: ::grpcio::Channel) -> Self { + GeometryServiceClient { + client: ::grpcio::Client::new(channel), + } + } + + pub fn operate_opt(&self, req: &super::geometry::GeometryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_GEOMETRY_SERVICE_OPERATE, req, opt) + } + + pub fn operate(&self, req: &super::geometry::GeometryRequest) -> ::grpcio::Result { + self.operate_opt(req, ::grpcio::CallOption::default()) + } + + pub fn operate_async_opt(&self, req: &super::geometry::GeometryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_GEOMETRY_SERVICE_OPERATE, req, opt) + } + + pub fn operate_async(&self, req: &super::geometry::GeometryRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.operate_async_opt(req, ::grpcio::CallOption::default()) + } + + pub fn operate_bi_stream_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.client.duplex_streaming(&METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM, opt) + } + + pub fn operate_bi_stream(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.operate_bi_stream_opt(::grpcio::CallOption::default()) + } + + pub fn operate_bi_stream_flow_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.client.duplex_streaming(&METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM_FLOW, opt) + } + + pub fn operate_bi_stream_flow(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.operate_bi_stream_flow_opt(::grpcio::CallOption::default()) + } + + pub fn operate_server_stream_opt(&self, req: &super::geometry::GeometryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.client.server_streaming(&METHOD_GEOMETRY_SERVICE_OPERATE_SERVER_STREAM, req, opt) + } + + pub fn operate_server_stream(&self, req: &super::geometry::GeometryRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.operate_server_stream_opt(req, ::grpcio::CallOption::default()) + } + + pub fn operate_client_stream_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientCStreamSender, ::grpcio::ClientCStreamReceiver)> { + self.client.client_streaming(&METHOD_GEOMETRY_SERVICE_OPERATE_CLIENT_STREAM, opt) + } + + pub fn operate_client_stream(&self) -> ::grpcio::Result<(::grpcio::ClientCStreamSender, ::grpcio::ClientCStreamReceiver)> { + self.operate_client_stream_opt(::grpcio::CallOption::default()) + } + + pub fn file_operate_bi_stream_flow_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.client.duplex_streaming(&METHOD_GEOMETRY_SERVICE_FILE_OPERATE_BI_STREAM_FLOW, opt) + } + + pub fn file_operate_bi_stream_flow(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.file_operate_bi_stream_flow_opt(::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static { + self.client.spawn(f) + } +} + +pub trait GeometryService { + fn operate(&mut self, ctx: ::grpcio::RpcContext, req: super::geometry::GeometryRequest, sink: ::grpcio::UnarySink); + fn operate_bi_stream(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn operate_bi_stream_flow(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn operate_server_stream(&mut self, ctx: ::grpcio::RpcContext, req: super::geometry::GeometryRequest, sink: ::grpcio::ServerStreamingSink); + fn operate_client_stream(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::ClientStreamingSink); + fn file_operate_bi_stream_flow(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); +} + +pub fn create_geometry_service(s: S) -> ::grpcio::Service { + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_GEOMETRY_SERVICE_OPERATE, move |ctx, req, resp| { + instance.operate(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_duplex_streaming_handler(&METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM, move |ctx, req, resp| { + instance.operate_bi_stream(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_duplex_streaming_handler(&METHOD_GEOMETRY_SERVICE_OPERATE_BI_STREAM_FLOW, move |ctx, req, resp| { + instance.operate_bi_stream_flow(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_server_streaming_handler(&METHOD_GEOMETRY_SERVICE_OPERATE_SERVER_STREAM, move |ctx, req, resp| { + instance.operate_server_stream(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_client_streaming_handler(&METHOD_GEOMETRY_SERVICE_OPERATE_CLIENT_STREAM, move |ctx, req, resp| { + instance.operate_client_stream(ctx, req, resp) + }); + let mut instance = s; + builder = builder.add_duplex_streaming_handler(&METHOD_GEOMETRY_SERVICE_FILE_OPERATE_BI_STREAM_FLOW, move |ctx, req, resp| { + instance.file_operate_bi_stream_flow(ctx, req, resp) + }); + builder.build() +} diff --git a/rust/src/proto/mod.rs b/rust/src/proto/mod.rs new file mode 100644 index 0000000..f4eccdf --- /dev/null +++ b/rust/src/proto/mod.rs @@ -0,0 +1,7 @@ +pub mod geometry; +pub mod geometry_service; +pub mod geometry_service_grpc; +pub mod query; +pub mod stac; +pub mod stac_service; +pub mod stac_service_grpc; diff --git a/rust/src/proto/query.rs b/rust/src/proto/query.rs new file mode 100644 index 0000000..cfc12f3 --- /dev/null +++ b/rust/src/proto/query.rs @@ -0,0 +1,1845 @@ +// This file is generated by rust-protobuf 2.10.0. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] +//! Generated file from `epl/protobuf/query.proto` + +use protobuf::Message as Message_imported_for_functions; +use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0; + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct FloatField { + // message fields + pub value: f32, + pub rel_type: FieldRelationship, + pub start: f32, + pub stop: f32, + pub sort_direction: SortDirection, + pub set: ::std::vec::Vec, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FloatField { + fn default() -> &'a FloatField { + ::default_instance() + } +} + +impl FloatField { + pub fn new() -> FloatField { + ::std::default::Default::default() + } + + // float value = 1; + + + pub fn get_value(&self) -> f32 { + self.value + } + pub fn clear_value(&mut self) { + self.value = 0.; + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: f32) { + self.value = v; + } + + // .epl.protobuf.FieldRelationship rel_type = 2; + + + pub fn get_rel_type(&self) -> FieldRelationship { + self.rel_type + } + pub fn clear_rel_type(&mut self) { + self.rel_type = FieldRelationship::EQ; + } + + // Param is passed by value, moved + pub fn set_rel_type(&mut self, v: FieldRelationship) { + self.rel_type = v; + } + + // float start = 3; + + + pub fn get_start(&self) -> f32 { + self.start + } + pub fn clear_start(&mut self) { + self.start = 0.; + } + + // Param is passed by value, moved + pub fn set_start(&mut self, v: f32) { + self.start = v; + } + + // float stop = 4; + + + pub fn get_stop(&self) -> f32 { + self.stop + } + pub fn clear_stop(&mut self) { + self.stop = 0.; + } + + // Param is passed by value, moved + pub fn set_stop(&mut self, v: f32) { + self.stop = v; + } + + // .epl.protobuf.SortDirection sort_direction = 5; + + + pub fn get_sort_direction(&self) -> SortDirection { + self.sort_direction + } + pub fn clear_sort_direction(&mut self) { + self.sort_direction = SortDirection::NOT_SORTED; + } + + // Param is passed by value, moved + pub fn set_sort_direction(&mut self, v: SortDirection) { + self.sort_direction = v; + } + + // repeated float set = 6; + + + pub fn get_set(&self) -> &[f32] { + &self.set + } + pub fn clear_set(&mut self) { + self.set.clear(); + } + + // Param is passed by value, moved + pub fn set_set(&mut self, v: ::std::vec::Vec) { + self.set = v; + } + + // Mutable pointer to the field. + pub fn mut_set(&mut self) -> &mut ::std::vec::Vec { + &mut self.set + } + + // Take field + pub fn take_set(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.set, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for FloatField { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed32 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_float()?; + self.value = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.rel_type, 2, &mut self.unknown_fields)? + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed32 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_float()?; + self.start = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed32 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_float()?; + self.stop = tmp; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.sort_direction, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_repeated_float_into(wire_type, is, &mut self.set)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.value != 0. { + my_size += 5; + } + if self.rel_type != FieldRelationship::EQ { + my_size += ::protobuf::rt::enum_size(2, self.rel_type); + } + if self.start != 0. { + my_size += 5; + } + if self.stop != 0. { + my_size += 5; + } + if self.sort_direction != SortDirection::NOT_SORTED { + my_size += ::protobuf::rt::enum_size(5, self.sort_direction); + } + my_size += 5 * self.set.len() as u32; + 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.value != 0. { + os.write_float(1, self.value)?; + } + if self.rel_type != FieldRelationship::EQ { + os.write_enum(2, self.rel_type.value())?; + } + if self.start != 0. { + os.write_float(3, self.start)?; + } + if self.stop != 0. { + os.write_float(4, self.stop)?; + } + if self.sort_direction != SortDirection::NOT_SORTED { + os.write_enum(5, self.sort_direction.value())?; + } + for v in &self.set { + os.write_float(6, *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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FloatField { + FloatField::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::ProtobufTypeFloat>( + "value", + |m: &FloatField| { &m.value }, + |m: &mut FloatField| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "rel_type", + |m: &FloatField| { &m.rel_type }, + |m: &mut FloatField| { &mut m.rel_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>( + "start", + |m: &FloatField| { &m.start }, + |m: &mut FloatField| { &mut m.start }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>( + "stop", + |m: &FloatField| { &m.stop }, + |m: &mut FloatField| { &mut m.stop }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "sort_direction", + |m: &FloatField| { &m.sort_direction }, + |m: &mut FloatField| { &mut m.sort_direction }, + )); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeFloat>( + "set", + |m: &FloatField| { &m.set }, + |m: &mut FloatField| { &mut m.set }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "FloatField", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static FloatField { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const FloatField, + }; + unsafe { + instance.get(FloatField::new) + } + } +} + +impl ::protobuf::Clear for FloatField { + fn clear(&mut self) { + self.value = 0.; + self.rel_type = FieldRelationship::EQ; + self.start = 0.; + self.stop = 0.; + self.sort_direction = SortDirection::NOT_SORTED; + self.set.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for FloatField { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for FloatField { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct DoubleField { + // message fields + pub value: f64, + pub rel_type: FieldRelationship, + pub start: f64, + pub stop: f64, + pub sort_direction: SortDirection, + pub set: ::std::vec::Vec, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a DoubleField { + fn default() -> &'a DoubleField { + ::default_instance() + } +} + +impl DoubleField { + pub fn new() -> DoubleField { + ::std::default::Default::default() + } + + // double value = 1; + + + pub fn get_value(&self) -> f64 { + self.value + } + pub fn clear_value(&mut self) { + self.value = 0.; + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: f64) { + self.value = v; + } + + // .epl.protobuf.FieldRelationship rel_type = 2; + + + pub fn get_rel_type(&self) -> FieldRelationship { + self.rel_type + } + pub fn clear_rel_type(&mut self) { + self.rel_type = FieldRelationship::EQ; + } + + // Param is passed by value, moved + pub fn set_rel_type(&mut self, v: FieldRelationship) { + self.rel_type = v; + } + + // double start = 3; + + + pub fn get_start(&self) -> f64 { + self.start + } + pub fn clear_start(&mut self) { + self.start = 0.; + } + + // Param is passed by value, moved + pub fn set_start(&mut self, v: f64) { + self.start = v; + } + + // double stop = 4; + + + pub fn get_stop(&self) -> f64 { + self.stop + } + pub fn clear_stop(&mut self) { + self.stop = 0.; + } + + // Param is passed by value, moved + pub fn set_stop(&mut self, v: f64) { + self.stop = v; + } + + // .epl.protobuf.SortDirection sort_direction = 5; + + + pub fn get_sort_direction(&self) -> SortDirection { + self.sort_direction + } + pub fn clear_sort_direction(&mut self) { + self.sort_direction = SortDirection::NOT_SORTED; + } + + // Param is passed by value, moved + pub fn set_sort_direction(&mut self, v: SortDirection) { + self.sort_direction = v; + } + + // repeated double set = 6; + + + pub fn get_set(&self) -> &[f64] { + &self.set + } + pub fn clear_set(&mut self) { + self.set.clear(); + } + + // Param is passed by value, moved + pub fn set_set(&mut self, v: ::std::vec::Vec) { + self.set = v; + } + + // Mutable pointer to the field. + pub fn mut_set(&mut self) -> &mut ::std::vec::Vec { + &mut self.set + } + + // Take field + pub fn take_set(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.set, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for DoubleField { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.value = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.rel_type, 2, &mut self.unknown_fields)? + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.start = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeFixed64 { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_double()?; + self.stop = tmp; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.sort_direction, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_repeated_double_into(wire_type, is, &mut self.set)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.value != 0. { + my_size += 9; + } + if self.rel_type != FieldRelationship::EQ { + my_size += ::protobuf::rt::enum_size(2, self.rel_type); + } + if self.start != 0. { + my_size += 9; + } + if self.stop != 0. { + my_size += 9; + } + if self.sort_direction != SortDirection::NOT_SORTED { + my_size += ::protobuf::rt::enum_size(5, self.sort_direction); + } + my_size += 9 * self.set.len() as u32; + 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.value != 0. { + os.write_double(1, self.value)?; + } + if self.rel_type != FieldRelationship::EQ { + os.write_enum(2, self.rel_type.value())?; + } + if self.start != 0. { + os.write_double(3, self.start)?; + } + if self.stop != 0. { + os.write_double(4, self.stop)?; + } + if self.sort_direction != SortDirection::NOT_SORTED { + os.write_enum(5, self.sort_direction.value())?; + } + for v in &self.set { + os.write_double(6, *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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> DoubleField { + DoubleField::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::ProtobufTypeDouble>( + "value", + |m: &DoubleField| { &m.value }, + |m: &mut DoubleField| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "rel_type", + |m: &DoubleField| { &m.rel_type }, + |m: &mut DoubleField| { &mut m.rel_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "start", + |m: &DoubleField| { &m.start }, + |m: &mut DoubleField| { &mut m.start }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "stop", + |m: &DoubleField| { &m.stop }, + |m: &mut DoubleField| { &mut m.stop }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "sort_direction", + |m: &DoubleField| { &m.sort_direction }, + |m: &mut DoubleField| { &mut m.sort_direction }, + )); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + "set", + |m: &DoubleField| { &m.set }, + |m: &mut DoubleField| { &mut m.set }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "DoubleField", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static DoubleField { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const DoubleField, + }; + unsafe { + instance.get(DoubleField::new) + } + } +} + +impl ::protobuf::Clear for DoubleField { + fn clear(&mut self) { + self.value = 0.; + self.rel_type = FieldRelationship::EQ; + self.start = 0.; + self.stop = 0.; + self.sort_direction = SortDirection::NOT_SORTED; + self.set.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for DoubleField { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DoubleField { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct TimestampField { + // message fields + pub value: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub rel_type: FieldRelationship, + pub start: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub stop: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub sort_direction: SortDirection, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TimestampField { + fn default() -> &'a TimestampField { + ::default_instance() + } +} + +impl TimestampField { + pub fn new() -> TimestampField { + ::std::default::Default::default() + } + + // .google.protobuf.Timestamp value = 1; + + + pub fn get_value(&self) -> &::protobuf::well_known_types::Timestamp { + self.value.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_value(&mut self) { + self.value.clear(); + } + + pub fn has_value(&self) -> bool { + self.value.is_some() + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.value = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_value(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.value.is_none() { + self.value.set_default(); + } + self.value.as_mut().unwrap() + } + + // Take field + pub fn take_value(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.value.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .epl.protobuf.FieldRelationship rel_type = 2; + + + pub fn get_rel_type(&self) -> FieldRelationship { + self.rel_type + } + pub fn clear_rel_type(&mut self) { + self.rel_type = FieldRelationship::EQ; + } + + // Param is passed by value, moved + pub fn set_rel_type(&mut self, v: FieldRelationship) { + self.rel_type = v; + } + + // .google.protobuf.Timestamp start = 3; + + + pub fn get_start(&self) -> &::protobuf::well_known_types::Timestamp { + self.start.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_start(&mut self) { + self.start.clear(); + } + + pub fn has_start(&self) -> bool { + self.start.is_some() + } + + // Param is passed by value, moved + pub fn set_start(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.start = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_start(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.start.is_none() { + self.start.set_default(); + } + self.start.as_mut().unwrap() + } + + // Take field + pub fn take_start(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.start.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .google.protobuf.Timestamp stop = 4; + + + pub fn get_stop(&self) -> &::protobuf::well_known_types::Timestamp { + self.stop.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_stop(&mut self) { + self.stop.clear(); + } + + pub fn has_stop(&self) -> bool { + self.stop.is_some() + } + + // Param is passed by value, moved + pub fn set_stop(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.stop = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_stop(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.stop.is_none() { + self.stop.set_default(); + } + self.stop.as_mut().unwrap() + } + + // Take field + pub fn take_stop(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.stop.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .epl.protobuf.SortDirection sort_direction = 5; + + + pub fn get_sort_direction(&self) -> SortDirection { + self.sort_direction + } + pub fn clear_sort_direction(&mut self) { + self.sort_direction = SortDirection::NOT_SORTED; + } + + // Param is passed by value, moved + pub fn set_sort_direction(&mut self, v: SortDirection) { + self.sort_direction = v; + } +} + +impl ::protobuf::Message for TimestampField { + fn is_initialized(&self) -> bool { + for v in &self.value { + if !v.is_initialized() { + return false; + } + }; + for v in &self.start { + if !v.is_initialized() { + return false; + } + }; + for v in &self.stop { + 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.value)?; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.rel_type, 2, &mut self.unknown_fields)? + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.stop)?; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.sort_direction, 5, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.value.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.rel_type != FieldRelationship::EQ { + my_size += ::protobuf::rt::enum_size(2, self.rel_type); + } + if let Some(ref v) = self.start.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.stop.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.sort_direction != SortDirection::NOT_SORTED { + my_size += ::protobuf::rt::enum_size(5, self.sort_direction); + } + 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.value.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 self.rel_type != FieldRelationship::EQ { + os.write_enum(2, self.rel_type.value())?; + } + if let Some(ref v) = self.start.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 Some(ref v) = self.stop.as_ref() { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.sort_direction != SortDirection::NOT_SORTED { + os.write_enum(5, self.sort_direction.value())?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> TimestampField { + TimestampField::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<::protobuf::well_known_types::Timestamp>>( + "value", + |m: &TimestampField| { &m.value }, + |m: &mut TimestampField| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "rel_type", + |m: &TimestampField| { &m.rel_type }, + |m: &mut TimestampField| { &mut m.rel_type }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "start", + |m: &TimestampField| { &m.start }, + |m: &mut TimestampField| { &mut m.start }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "stop", + |m: &TimestampField| { &m.stop }, + |m: &mut TimestampField| { &mut m.stop }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "sort_direction", + |m: &TimestampField| { &m.sort_direction }, + |m: &mut TimestampField| { &mut m.sort_direction }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "TimestampField", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static TimestampField { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const TimestampField, + }; + unsafe { + instance.get(TimestampField::new) + } + } +} + +impl ::protobuf::Clear for TimestampField { + fn clear(&mut self) { + self.value.clear(); + self.rel_type = FieldRelationship::EQ; + self.start.clear(); + self.stop.clear(); + self.sort_direction = SortDirection::NOT_SORTED; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for TimestampField { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for TimestampField { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct UInt32Field { + // message fields + pub value: u32, + pub rel_type: FieldRelationship, + pub start: u32, + pub stop: u32, + pub sort_direction: SortDirection, + pub set: ::std::vec::Vec, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UInt32Field { + fn default() -> &'a UInt32Field { + ::default_instance() + } +} + +impl UInt32Field { + pub fn new() -> UInt32Field { + ::std::default::Default::default() + } + + // uint32 value = 1; + + + pub fn get_value(&self) -> u32 { + self.value + } + pub fn clear_value(&mut self) { + self.value = 0; + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: u32) { + self.value = v; + } + + // .epl.protobuf.FieldRelationship rel_type = 2; + + + pub fn get_rel_type(&self) -> FieldRelationship { + self.rel_type + } + pub fn clear_rel_type(&mut self) { + self.rel_type = FieldRelationship::EQ; + } + + // Param is passed by value, moved + pub fn set_rel_type(&mut self, v: FieldRelationship) { + self.rel_type = v; + } + + // uint32 start = 3; + + + pub fn get_start(&self) -> u32 { + self.start + } + pub fn clear_start(&mut self) { + self.start = 0; + } + + // Param is passed by value, moved + pub fn set_start(&mut self, v: u32) { + self.start = v; + } + + // uint32 stop = 4; + + + pub fn get_stop(&self) -> u32 { + self.stop + } + pub fn clear_stop(&mut self) { + self.stop = 0; + } + + // Param is passed by value, moved + pub fn set_stop(&mut self, v: u32) { + self.stop = v; + } + + // .epl.protobuf.SortDirection sort_direction = 5; + + + pub fn get_sort_direction(&self) -> SortDirection { + self.sort_direction + } + pub fn clear_sort_direction(&mut self) { + self.sort_direction = SortDirection::NOT_SORTED; + } + + // Param is passed by value, moved + pub fn set_sort_direction(&mut self, v: SortDirection) { + self.sort_direction = v; + } + + // repeated uint32 set = 6; + + + pub fn get_set(&self) -> &[u32] { + &self.set + } + pub fn clear_set(&mut self) { + self.set.clear(); + } + + // Param is passed by value, moved + pub fn set_set(&mut self, v: ::std::vec::Vec) { + self.set = v; + } + + // Mutable pointer to the field. + pub fn mut_set(&mut self) -> &mut ::std::vec::Vec { + &mut self.set + } + + // Take field + pub fn take_set(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.set, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for UInt32Field { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.value = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.rel_type, 2, &mut self.unknown_fields)? + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.start = tmp; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.stop = tmp; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.sort_direction, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_repeated_uint32_into(wire_type, is, &mut self.set)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.value != 0 { + my_size += ::protobuf::rt::value_size(1, self.value, ::protobuf::wire_format::WireTypeVarint); + } + if self.rel_type != FieldRelationship::EQ { + my_size += ::protobuf::rt::enum_size(2, self.rel_type); + } + if self.start != 0 { + my_size += ::protobuf::rt::value_size(3, self.start, ::protobuf::wire_format::WireTypeVarint); + } + if self.stop != 0 { + my_size += ::protobuf::rt::value_size(4, self.stop, ::protobuf::wire_format::WireTypeVarint); + } + if self.sort_direction != SortDirection::NOT_SORTED { + my_size += ::protobuf::rt::enum_size(5, self.sort_direction); + } + for value in &self.set { + my_size += ::protobuf::rt::value_size(6, *value, ::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<()> { + if self.value != 0 { + os.write_uint32(1, self.value)?; + } + if self.rel_type != FieldRelationship::EQ { + os.write_enum(2, self.rel_type.value())?; + } + if self.start != 0 { + os.write_uint32(3, self.start)?; + } + if self.stop != 0 { + os.write_uint32(4, self.stop)?; + } + if self.sort_direction != SortDirection::NOT_SORTED { + os.write_enum(5, self.sort_direction.value())?; + } + for v in &self.set { + os.write_uint32(6, *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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UInt32Field { + UInt32Field::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::ProtobufTypeUint32>( + "value", + |m: &UInt32Field| { &m.value }, + |m: &mut UInt32Field| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "rel_type", + |m: &UInt32Field| { &m.rel_type }, + |m: &mut UInt32Field| { &mut m.rel_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "start", + |m: &UInt32Field| { &m.start }, + |m: &mut UInt32Field| { &mut m.start }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "stop", + |m: &UInt32Field| { &m.stop }, + |m: &mut UInt32Field| { &mut m.stop }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "sort_direction", + |m: &UInt32Field| { &m.sort_direction }, + |m: &mut UInt32Field| { &mut m.sort_direction }, + )); + fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "set", + |m: &UInt32Field| { &m.set }, + |m: &mut UInt32Field| { &mut m.set }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "UInt32Field", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static UInt32Field { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const UInt32Field, + }; + unsafe { + instance.get(UInt32Field::new) + } + } +} + +impl ::protobuf::Clear for UInt32Field { + fn clear(&mut self) { + self.value = 0; + self.rel_type = FieldRelationship::EQ; + self.start = 0; + self.stop = 0; + self.sort_direction = SortDirection::NOT_SORTED; + self.set.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UInt32Field { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UInt32Field { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct StringField { + // message fields + pub value: ::std::string::String, + pub rel_type: FieldRelationship, + pub set: ::protobuf::RepeatedField<::std::string::String>, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StringField { + fn default() -> &'a StringField { + ::default_instance() + } +} + +impl StringField { + pub fn new() -> StringField { + ::std::default::Default::default() + } + + // string value = 1; + + + pub fn get_value(&self) -> &str { + &self.value + } + pub fn clear_value(&mut self) { + self.value.clear(); + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: ::std::string::String) { + self.value = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_value(&mut self) -> &mut ::std::string::String { + &mut self.value + } + + // Take field + pub fn take_value(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.value, ::std::string::String::new()) + } + + // .epl.protobuf.FieldRelationship rel_type = 2; + + + pub fn get_rel_type(&self) -> FieldRelationship { + self.rel_type + } + pub fn clear_rel_type(&mut self) { + self.rel_type = FieldRelationship::EQ; + } + + // Param is passed by value, moved + pub fn set_rel_type(&mut self, v: FieldRelationship) { + self.rel_type = v; + } + + // repeated string set = 6; + + + pub fn get_set(&self) -> &[::std::string::String] { + &self.set + } + pub fn clear_set(&mut self) { + self.set.clear(); + } + + // Param is passed by value, moved + pub fn set_set(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.set = v; + } + + // Mutable pointer to the field. + pub fn mut_set(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.set + } + + // Take field + pub fn take_set(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.set, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for StringField { + 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_string_into(wire_type, is, &mut self.value)?; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.rel_type, 2, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.set)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.value.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.value); + } + if self.rel_type != FieldRelationship::EQ { + my_size += ::protobuf::rt::enum_size(2, self.rel_type); + } + for value in &self.set { + my_size += ::protobuf::rt::string_size(6, &value); + }; + 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.value.is_empty() { + os.write_string(1, &self.value)?; + } + if self.rel_type != FieldRelationship::EQ { + os.write_enum(2, self.rel_type.value())?; + } + for v in &self.set { + os.write_string(6, &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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StringField { + StringField::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::ProtobufTypeString>( + "value", + |m: &StringField| { &m.value }, + |m: &mut StringField| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "rel_type", + |m: &StringField| { &m.rel_type }, + |m: &mut StringField| { &mut m.rel_type }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "set", + |m: &StringField| { &m.set }, + |m: &mut StringField| { &mut m.set }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "StringField", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static StringField { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const StringField, + }; + unsafe { + instance.get(StringField::new) + } + } +} + +impl ::protobuf::Clear for StringField { + fn clear(&mut self) { + self.value.clear(); + self.rel_type = FieldRelationship::EQ; + self.set.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for StringField { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for StringField { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum SortDirection { + NOT_SORTED = 0, + DESC = 1, + ASC = 2, +} + +impl ::protobuf::ProtobufEnum for SortDirection { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(SortDirection::NOT_SORTED), + 1 => ::std::option::Option::Some(SortDirection::DESC), + 2 => ::std::option::Option::Some(SortDirection::ASC), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [SortDirection] = &[ + SortDirection::NOT_SORTED, + SortDirection::DESC, + SortDirection::ASC, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("SortDirection", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for SortDirection { +} + +impl ::std::default::Default for SortDirection { + fn default() -> Self { + SortDirection::NOT_SORTED + } +} + +impl ::protobuf::reflect::ProtobufValue for SortDirection { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum FieldRelationship { + EQ = 0, + LT_OR_EQ = 2, + GT_OR_EQ = 4, + LT = 8, + GT = 16, + BETWEEN = 32, + NOT_BETWEEN = 64, + NOT_EQ = 128, + IN = 256, + NOT_IN = 512, + LIKE = 1024, + NOT_LIKE = 2048, +} + +impl ::protobuf::ProtobufEnum for FieldRelationship { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(FieldRelationship::EQ), + 2 => ::std::option::Option::Some(FieldRelationship::LT_OR_EQ), + 4 => ::std::option::Option::Some(FieldRelationship::GT_OR_EQ), + 8 => ::std::option::Option::Some(FieldRelationship::LT), + 16 => ::std::option::Option::Some(FieldRelationship::GT), + 32 => ::std::option::Option::Some(FieldRelationship::BETWEEN), + 64 => ::std::option::Option::Some(FieldRelationship::NOT_BETWEEN), + 128 => ::std::option::Option::Some(FieldRelationship::NOT_EQ), + 256 => ::std::option::Option::Some(FieldRelationship::IN), + 512 => ::std::option::Option::Some(FieldRelationship::NOT_IN), + 1024 => ::std::option::Option::Some(FieldRelationship::LIKE), + 2048 => ::std::option::Option::Some(FieldRelationship::NOT_LIKE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [FieldRelationship] = &[ + FieldRelationship::EQ, + FieldRelationship::LT_OR_EQ, + FieldRelationship::GT_OR_EQ, + FieldRelationship::LT, + FieldRelationship::GT, + FieldRelationship::BETWEEN, + FieldRelationship::NOT_BETWEEN, + FieldRelationship::NOT_EQ, + FieldRelationship::IN, + FieldRelationship::NOT_IN, + FieldRelationship::LIKE, + FieldRelationship::NOT_LIKE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("FieldRelationship", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for FieldRelationship { +} + +impl ::std::default::Default for FieldRelationship { + fn default() -> Self { + FieldRelationship::EQ + } +} + +impl ::protobuf::reflect::ProtobufValue for FieldRelationship { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x18epl/protobuf/query.proto\x12\x0cepl.protobuf\x1a\x1fgoogle/protobu\ + f/timestamp.proto\"\xde\x01\n\nFloatField\x12\x14\n\x05value\x18\x01\x20\ + \x01(\x02R\x05value\x12:\n\x08rel_type\x18\x02\x20\x01(\x0e2\x1f.epl.pro\ + tobuf.FieldRelationshipR\x07relType\x12\x14\n\x05start\x18\x03\x20\x01(\ + \x02R\x05start\x12\x12\n\x04stop\x18\x04\x20\x01(\x02R\x04stop\x12B\n\ + \x0esort_direction\x18\x05\x20\x01(\x0e2\x1b.epl.protobuf.SortDirectionR\ + \rsortDirection\x12\x10\n\x03set\x18\x06\x20\x03(\x02R\x03set\"\xdf\x01\ + \n\x0bDoubleField\x12\x14\n\x05value\x18\x01\x20\x01(\x01R\x05value\x12:\ + \n\x08rel_type\x18\x02\x20\x01(\x0e2\x1f.epl.protobuf.FieldRelationshipR\ + \x07relType\x12\x14\n\x05start\x18\x03\x20\x01(\x01R\x05start\x12\x12\n\ + \x04stop\x18\x04\x20\x01(\x01R\x04stop\x12B\n\x0esort_direction\x18\x05\ + \x20\x01(\x0e2\x1b.epl.protobuf.SortDirectionR\rsortDirection\x12\x10\n\ + \x03set\x18\x06\x20\x03(\x01R\x03set\"\xa4\x02\n\x0eTimestampField\x120\ + \n\x05value\x18\x01\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x05valu\ + e\x12:\n\x08rel_type\x18\x02\x20\x01(\x0e2\x1f.epl.protobuf.FieldRelatio\ + nshipR\x07relType\x120\n\x05start\x18\x03\x20\x01(\x0b2\x1a.google.proto\ + buf.TimestampR\x05start\x12.\n\x04stop\x18\x04\x20\x01(\x0b2\x1a.google.\ + protobuf.TimestampR\x04stop\x12B\n\x0esort_direction\x18\x05\x20\x01(\ + \x0e2\x1b.epl.protobuf.SortDirectionR\rsortDirection\"\xdf\x01\n\x0bUInt\ + 32Field\x12\x14\n\x05value\x18\x01\x20\x01(\rR\x05value\x12:\n\x08rel_ty\ + pe\x18\x02\x20\x01(\x0e2\x1f.epl.protobuf.FieldRelationshipR\x07relType\ + \x12\x14\n\x05start\x18\x03\x20\x01(\rR\x05start\x12\x12\n\x04stop\x18\ + \x04\x20\x01(\rR\x04stop\x12B\n\x0esort_direction\x18\x05\x20\x01(\x0e2\ + \x1b.epl.protobuf.SortDirectionR\rsortDirection\x12\x10\n\x03set\x18\x06\ + \x20\x03(\rR\x03set\"q\n\x0bStringField\x12\x14\n\x05value\x18\x01\x20\ + \x01(\tR\x05value\x12:\n\x08rel_type\x18\x02\x20\x01(\x0e2\x1f.epl.proto\ + buf.FieldRelationshipR\x07relType\x12\x10\n\x03set\x18\x06\x20\x03(\tR\ + \x03set*2\n\rSortDirection\x12\x0e\n\nNOT_SORTED\x10\0\x12\x08\n\x04DESC\ + \x10\x01\x12\x07\n\x03ASC\x10\x02*\xa2\x01\n\x11FieldRelationship\x12\ + \x06\n\x02EQ\x10\0\x12\x0c\n\x08LT_OR_EQ\x10\x02\x12\x0c\n\x08GT_OR_EQ\ + \x10\x04\x12\x06\n\x02LT\x10\x08\x12\x06\n\x02GT\x10\x10\x12\x0b\n\x07BE\ + TWEEN\x10\x20\x12\x0f\n\x0bNOT_BETWEEN\x10@\x12\x0b\n\x06NOT_EQ\x10\x80\ + \x01\x12\x07\n\x02IN\x10\x80\x02\x12\x0b\n\x06NOT_IN\x10\x80\x04\x12\t\n\ + \x04LIKE\x10\x80\x08\x12\r\n\x08NOT_LIKE\x10\x80\x10BS\n\x10com.epl.prot\ + obufB\nQueryProtoP\x01Z+github.com/geo-grpc/api/golang/epl/protobuf\xa2\ + \x02\x03QPBb\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() + }) + } +} diff --git a/rust/src/proto/stac.rs b/rust/src/proto/stac.rs new file mode 100644 index 0000000..a11fb76 --- /dev/null +++ b/rust/src/proto/stac.rs @@ -0,0 +1,5932 @@ +// This file is generated by rust-protobuf 2.10.0. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] +//! Generated file from `epl/protobuf/stac.proto` + +use protobuf::Message as Message_imported_for_functions; +use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0; + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct StacItem { + // message fields + pub id: ::std::string::String, + pub geometry: ::protobuf::SingularPtrField, + pub bbox: ::protobuf::SingularPtrField, + pub properties: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>, + pub assets: ::std::collections::HashMap<::std::string::String, Asset>, + pub datetime: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub title: ::std::string::String, + pub collection: ::std::string::String, + pub observed: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub duration: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, + pub processed: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub updated: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub eo: ::protobuf::SingularPtrField, + pub sar: ::protobuf::SingularPtrField, + pub landsat: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StacItem { + fn default() -> &'a StacItem { + ::default_instance() + } +} + +impl StacItem { + pub fn new() -> StacItem { + ::std::default::Default::default() + } + + // string id = 1; + + + pub fn get_id(&self) -> &str { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::string::String) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::string::String { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.id, ::std::string::String::new()) + } + + // .epl.protobuf.GeometryData geometry = 3; + + + pub fn get_geometry(&self) -> &super::geometry::GeometryData { + self.geometry.as_ref().unwrap_or_else(|| super::geometry::GeometryData::default_instance()) + } + pub fn clear_geometry(&mut self) { + self.geometry.clear(); + } + + pub fn has_geometry(&self) -> bool { + self.geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry(&mut self, v: super::geometry::GeometryData) { + self.geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry(&mut self) -> &mut super::geometry::GeometryData { + if self.geometry.is_none() { + self.geometry.set_default(); + } + self.geometry.as_mut().unwrap() + } + + // Take field + pub fn take_geometry(&mut self) -> super::geometry::GeometryData { + self.geometry.take().unwrap_or_else(|| super::geometry::GeometryData::new()) + } + + // .epl.protobuf.EnvelopeData bbox = 4; + + + pub fn get_bbox(&self) -> &super::geometry::EnvelopeData { + self.bbox.as_ref().unwrap_or_else(|| super::geometry::EnvelopeData::default_instance()) + } + pub fn clear_bbox(&mut self) { + self.bbox.clear(); + } + + pub fn has_bbox(&self) -> bool { + self.bbox.is_some() + } + + // Param is passed by value, moved + pub fn set_bbox(&mut self, v: super::geometry::EnvelopeData) { + self.bbox = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_bbox(&mut self) -> &mut super::geometry::EnvelopeData { + if self.bbox.is_none() { + self.bbox.set_default(); + } + self.bbox.as_mut().unwrap() + } + + // Take field + pub fn take_bbox(&mut self) -> super::geometry::EnvelopeData { + self.bbox.take().unwrap_or_else(|| super::geometry::EnvelopeData::new()) + } + + // .google.protobuf.Any properties = 5; + + + pub fn get_properties(&self) -> &::protobuf::well_known_types::Any { + self.properties.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Any::default_instance()) + } + pub fn clear_properties(&mut self) { + self.properties.clear(); + } + + pub fn has_properties(&self) -> bool { + self.properties.is_some() + } + + // Param is passed by value, moved + pub fn set_properties(&mut self, v: ::protobuf::well_known_types::Any) { + self.properties = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_properties(&mut self) -> &mut ::protobuf::well_known_types::Any { + if self.properties.is_none() { + self.properties.set_default(); + } + self.properties.as_mut().unwrap() + } + + // Take field + pub fn take_properties(&mut self) -> ::protobuf::well_known_types::Any { + self.properties.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new()) + } + + // repeated .epl.protobuf.StacItem.AssetsEntry assets = 7; + + + pub fn get_assets(&self) -> &::std::collections::HashMap<::std::string::String, Asset> { + &self.assets + } + pub fn clear_assets(&mut self) { + self.assets.clear(); + } + + // Param is passed by value, moved + pub fn set_assets(&mut self, v: ::std::collections::HashMap<::std::string::String, Asset>) { + self.assets = v; + } + + // Mutable pointer to the field. + pub fn mut_assets(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, Asset> { + &mut self.assets + } + + // Take field + pub fn take_assets(&mut self) -> ::std::collections::HashMap<::std::string::String, Asset> { + ::std::mem::replace(&mut self.assets, ::std::collections::HashMap::new()) + } + + // .google.protobuf.Timestamp datetime = 8; + + + pub fn get_datetime(&self) -> &::protobuf::well_known_types::Timestamp { + self.datetime.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_datetime(&mut self) { + self.datetime.clear(); + } + + pub fn has_datetime(&self) -> bool { + self.datetime.is_some() + } + + // Param is passed by value, moved + pub fn set_datetime(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.datetime = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_datetime(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.datetime.is_none() { + self.datetime.set_default(); + } + self.datetime.as_mut().unwrap() + } + + // Take field + pub fn take_datetime(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.datetime.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // string title = 9; + + + pub fn get_title(&self) -> &str { + &self.title + } + pub fn clear_title(&mut self) { + self.title.clear(); + } + + // Param is passed by value, moved + pub fn set_title(&mut self, v: ::std::string::String) { + self.title = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_title(&mut self) -> &mut ::std::string::String { + &mut self.title + } + + // Take field + pub fn take_title(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.title, ::std::string::String::new()) + } + + // string collection = 10; + + + pub fn get_collection(&self) -> &str { + &self.collection + } + pub fn clear_collection(&mut self) { + self.collection.clear(); + } + + // Param is passed by value, moved + pub fn set_collection(&mut self, v: ::std::string::String) { + self.collection = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_collection(&mut self) -> &mut ::std::string::String { + &mut self.collection + } + + // Take field + pub fn take_collection(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.collection, ::std::string::String::new()) + } + + // .google.protobuf.Timestamp observed = 11; + + + pub fn get_observed(&self) -> &::protobuf::well_known_types::Timestamp { + self.observed.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_observed(&mut self) { + self.observed.clear(); + } + + pub fn has_observed(&self) -> bool { + self.observed.is_some() + } + + // Param is passed by value, moved + pub fn set_observed(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.observed = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_observed(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.observed.is_none() { + self.observed.set_default(); + } + self.observed.as_mut().unwrap() + } + + // Take field + pub fn take_observed(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.observed.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .google.protobuf.Duration duration = 18; + + + pub fn get_duration(&self) -> &::protobuf::well_known_types::Duration { + self.duration.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Duration::default_instance()) + } + pub fn clear_duration(&mut self) { + self.duration.clear(); + } + + pub fn has_duration(&self) -> bool { + self.duration.is_some() + } + + // Param is passed by value, moved + pub fn set_duration(&mut self, v: ::protobuf::well_known_types::Duration) { + self.duration = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_duration(&mut self) -> &mut ::protobuf::well_known_types::Duration { + if self.duration.is_none() { + self.duration.set_default(); + } + self.duration.as_mut().unwrap() + } + + // Take field + pub fn take_duration(&mut self) -> ::protobuf::well_known_types::Duration { + self.duration.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) + } + + // .google.protobuf.Timestamp processed = 12; + + + pub fn get_processed(&self) -> &::protobuf::well_known_types::Timestamp { + self.processed.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_processed(&mut self) { + self.processed.clear(); + } + + pub fn has_processed(&self) -> bool { + self.processed.is_some() + } + + // Param is passed by value, moved + pub fn set_processed(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.processed = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_processed(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.processed.is_none() { + self.processed.set_default(); + } + self.processed.as_mut().unwrap() + } + + // Take field + pub fn take_processed(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.processed.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .google.protobuf.Timestamp updated = 13; + + + pub fn get_updated(&self) -> &::protobuf::well_known_types::Timestamp { + self.updated.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_updated(&mut self) { + self.updated.clear(); + } + + pub fn has_updated(&self) -> bool { + self.updated.is_some() + } + + // Param is passed by value, moved + pub fn set_updated(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.updated = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_updated(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.updated.is_none() { + self.updated.set_default(); + } + self.updated.as_mut().unwrap() + } + + // Take field + pub fn take_updated(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.updated.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .epl.protobuf.Eo eo = 14; + + + pub fn get_eo(&self) -> &Eo { + self.eo.as_ref().unwrap_or_else(|| Eo::default_instance()) + } + pub fn clear_eo(&mut self) { + self.eo.clear(); + } + + pub fn has_eo(&self) -> bool { + self.eo.is_some() + } + + // Param is passed by value, moved + pub fn set_eo(&mut self, v: Eo) { + self.eo = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_eo(&mut self) -> &mut Eo { + if self.eo.is_none() { + self.eo.set_default(); + } + self.eo.as_mut().unwrap() + } + + // Take field + pub fn take_eo(&mut self) -> Eo { + self.eo.take().unwrap_or_else(|| Eo::new()) + } + + // .epl.protobuf.Sar sar = 15; + + + pub fn get_sar(&self) -> &Sar { + self.sar.as_ref().unwrap_or_else(|| Sar::default_instance()) + } + pub fn clear_sar(&mut self) { + self.sar.clear(); + } + + pub fn has_sar(&self) -> bool { + self.sar.is_some() + } + + // Param is passed by value, moved + pub fn set_sar(&mut self, v: Sar) { + self.sar = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sar(&mut self) -> &mut Sar { + if self.sar.is_none() { + self.sar.set_default(); + } + self.sar.as_mut().unwrap() + } + + // Take field + pub fn take_sar(&mut self) -> Sar { + self.sar.take().unwrap_or_else(|| Sar::new()) + } + + // .epl.protobuf.Landsat landsat = 17; + + + pub fn get_landsat(&self) -> &Landsat { + self.landsat.as_ref().unwrap_or_else(|| Landsat::default_instance()) + } + pub fn clear_landsat(&mut self) { + self.landsat.clear(); + } + + pub fn has_landsat(&self) -> bool { + self.landsat.is_some() + } + + // Param is passed by value, moved + pub fn set_landsat(&mut self, v: Landsat) { + self.landsat = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_landsat(&mut self) -> &mut Landsat { + if self.landsat.is_none() { + self.landsat.set_default(); + } + self.landsat.as_mut().unwrap() + } + + // Take field + pub fn take_landsat(&mut self) -> Landsat { + self.landsat.take().unwrap_or_else(|| Landsat::new()) + } +} + +impl ::protobuf::Message for StacItem { + fn is_initialized(&self) -> bool { + for v in &self.geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.bbox { + if !v.is_initialized() { + return false; + } + }; + for v in &self.properties { + if !v.is_initialized() { + return false; + } + }; + for v in &self.datetime { + if !v.is_initialized() { + return false; + } + }; + for v in &self.observed { + if !v.is_initialized() { + return false; + } + }; + for v in &self.duration { + if !v.is_initialized() { + return false; + } + }; + for v in &self.processed { + if !v.is_initialized() { + return false; + } + }; + for v in &self.updated { + if !v.is_initialized() { + return false; + } + }; + for v in &self.eo { + if !v.is_initialized() { + return false; + } + }; + for v in &self.sar { + if !v.is_initialized() { + return false; + } + }; + for v in &self.landsat { + 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_string_into(wire_type, is, &mut self.id)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.geometry)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.bbox)?; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.properties)?; + }, + 7 => { + ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(wire_type, is, &mut self.assets)?; + }, + 8 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.datetime)?; + }, + 9 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; + }, + 10 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.collection)?; + }, + 11 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.observed)?; + }, + 18 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.duration)?; + }, + 12 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.processed)?; + }, + 13 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.updated)?; + }, + 14 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.eo)?; + }, + 15 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sar)?; + }, + 17 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.landsat)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id); + } + if let Some(ref v) = self.geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.bbox.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.properties.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(7, &self.assets); + if let Some(ref v) = self.datetime.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if !self.title.is_empty() { + my_size += ::protobuf::rt::string_size(9, &self.title); + } + if !self.collection.is_empty() { + my_size += ::protobuf::rt::string_size(10, &self.collection); + } + if let Some(ref v) = self.observed.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.duration.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.processed.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.updated.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.eo.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.sar.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.landsat.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::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 !self.id.is_empty() { + os.write_string(1, &self.id)?; + } + if let Some(ref v) = self.geometry.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 Some(ref v) = self.bbox.as_ref() { + os.write_tag(4, ::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.properties.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(7, &self.assets, os)?; + if let Some(ref v) = self.datetime.as_ref() { + os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.title.is_empty() { + os.write_string(9, &self.title)?; + } + if !self.collection.is_empty() { + os.write_string(10, &self.collection)?; + } + if let Some(ref v) = self.observed.as_ref() { + os.write_tag(11, ::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.duration.as_ref() { + os.write_tag(18, ::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.processed.as_ref() { + os.write_tag(12, ::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.updated.as_ref() { + os.write_tag(13, ::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.eo.as_ref() { + os.write_tag(14, ::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.sar.as_ref() { + os.write_tag(15, ::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.landsat.as_ref() { + os.write_tag(17, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StacItem { + StacItem::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::ProtobufTypeString>( + "id", + |m: &StacItem| { &m.id }, + |m: &mut StacItem| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "geometry", + |m: &StacItem| { &m.geometry }, + |m: &mut StacItem| { &mut m.geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "bbox", + |m: &StacItem| { &m.bbox }, + |m: &mut StacItem| { &mut m.bbox }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>( + "properties", + |m: &StacItem| { &m.properties }, + |m: &mut StacItem| { &mut m.properties }, + )); + fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>( + "assets", + |m: &StacItem| { &m.assets }, + |m: &mut StacItem| { &mut m.assets }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "datetime", + |m: &StacItem| { &m.datetime }, + |m: &mut StacItem| { &mut m.datetime }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "title", + |m: &StacItem| { &m.title }, + |m: &mut StacItem| { &mut m.title }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "collection", + |m: &StacItem| { &m.collection }, + |m: &mut StacItem| { &mut m.collection }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "observed", + |m: &StacItem| { &m.observed }, + |m: &mut StacItem| { &mut m.observed }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( + "duration", + |m: &StacItem| { &m.duration }, + |m: &mut StacItem| { &mut m.duration }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "processed", + |m: &StacItem| { &m.processed }, + |m: &mut StacItem| { &mut m.processed }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "updated", + |m: &StacItem| { &m.updated }, + |m: &mut StacItem| { &mut m.updated }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "eo", + |m: &StacItem| { &m.eo }, + |m: &mut StacItem| { &mut m.eo }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sar", + |m: &StacItem| { &m.sar }, + |m: &mut StacItem| { &mut m.sar }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "landsat", + |m: &StacItem| { &m.landsat }, + |m: &mut StacItem| { &mut m.landsat }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "StacItem", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static StacItem { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const StacItem, + }; + unsafe { + instance.get(StacItem::new) + } + } +} + +impl ::protobuf::Clear for StacItem { + fn clear(&mut self) { + self.id.clear(); + self.geometry.clear(); + self.bbox.clear(); + self.properties.clear(); + self.assets.clear(); + self.datetime.clear(); + self.title.clear(); + self.collection.clear(); + self.observed.clear(); + self.duration.clear(); + self.processed.clear(); + self.updated.clear(); + self.eo.clear(); + self.sar.clear(); + self.landsat.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for StacItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for StacItem { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct StacRequest { + // message fields + pub id: ::std::string::String, + pub geometry: ::protobuf::SingularPtrField, + pub bbox: ::protobuf::SingularPtrField, + pub geometry_request: ::protobuf::SingularPtrField, + pub properties: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>, + pub datetime: ::protobuf::SingularPtrField, + pub observed: ::protobuf::SingularPtrField, + pub processed: ::protobuf::SingularPtrField, + pub updated: ::protobuf::SingularPtrField, + pub eo: ::protobuf::SingularPtrField, + pub limit: u32, + pub offset: u64, + pub landsat: ::protobuf::SingularPtrField, + pub collection: ::std::string::String, + pub id_complex: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StacRequest { + fn default() -> &'a StacRequest { + ::default_instance() + } +} + +impl StacRequest { + pub fn new() -> StacRequest { + ::std::default::Default::default() + } + + // string id = 1; + + + pub fn get_id(&self) -> &str { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::string::String) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::string::String { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.id, ::std::string::String::new()) + } + + // .epl.protobuf.GeometryData geometry = 2; + + + pub fn get_geometry(&self) -> &super::geometry::GeometryData { + self.geometry.as_ref().unwrap_or_else(|| super::geometry::GeometryData::default_instance()) + } + pub fn clear_geometry(&mut self) { + self.geometry.clear(); + } + + pub fn has_geometry(&self) -> bool { + self.geometry.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry(&mut self, v: super::geometry::GeometryData) { + self.geometry = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry(&mut self) -> &mut super::geometry::GeometryData { + if self.geometry.is_none() { + self.geometry.set_default(); + } + self.geometry.as_mut().unwrap() + } + + // Take field + pub fn take_geometry(&mut self) -> super::geometry::GeometryData { + self.geometry.take().unwrap_or_else(|| super::geometry::GeometryData::new()) + } + + // .epl.protobuf.EnvelopeData bbox = 3; + + + pub fn get_bbox(&self) -> &super::geometry::EnvelopeData { + self.bbox.as_ref().unwrap_or_else(|| super::geometry::EnvelopeData::default_instance()) + } + pub fn clear_bbox(&mut self) { + self.bbox.clear(); + } + + pub fn has_bbox(&self) -> bool { + self.bbox.is_some() + } + + // Param is passed by value, moved + pub fn set_bbox(&mut self, v: super::geometry::EnvelopeData) { + self.bbox = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_bbox(&mut self) -> &mut super::geometry::EnvelopeData { + if self.bbox.is_none() { + self.bbox.set_default(); + } + self.bbox.as_mut().unwrap() + } + + // Take field + pub fn take_bbox(&mut self) -> super::geometry::EnvelopeData { + self.bbox.take().unwrap_or_else(|| super::geometry::EnvelopeData::new()) + } + + // .epl.protobuf.GeometryRequest geometry_request = 4; + + + pub fn get_geometry_request(&self) -> &super::geometry::GeometryRequest { + self.geometry_request.as_ref().unwrap_or_else(|| super::geometry::GeometryRequest::default_instance()) + } + pub fn clear_geometry_request(&mut self) { + self.geometry_request.clear(); + } + + pub fn has_geometry_request(&self) -> bool { + self.geometry_request.is_some() + } + + // Param is passed by value, moved + pub fn set_geometry_request(&mut self, v: super::geometry::GeometryRequest) { + self.geometry_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_geometry_request(&mut self) -> &mut super::geometry::GeometryRequest { + if self.geometry_request.is_none() { + self.geometry_request.set_default(); + } + self.geometry_request.as_mut().unwrap() + } + + // Take field + pub fn take_geometry_request(&mut self) -> super::geometry::GeometryRequest { + self.geometry_request.take().unwrap_or_else(|| super::geometry::GeometryRequest::new()) + } + + // .google.protobuf.Any properties = 5; + + + pub fn get_properties(&self) -> &::protobuf::well_known_types::Any { + self.properties.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Any::default_instance()) + } + pub fn clear_properties(&mut self) { + self.properties.clear(); + } + + pub fn has_properties(&self) -> bool { + self.properties.is_some() + } + + // Param is passed by value, moved + pub fn set_properties(&mut self, v: ::protobuf::well_known_types::Any) { + self.properties = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_properties(&mut self) -> &mut ::protobuf::well_known_types::Any { + if self.properties.is_none() { + self.properties.set_default(); + } + self.properties.as_mut().unwrap() + } + + // Take field + pub fn take_properties(&mut self) -> ::protobuf::well_known_types::Any { + self.properties.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new()) + } + + // .epl.protobuf.TimestampField datetime = 6; + + + pub fn get_datetime(&self) -> &super::query::TimestampField { + self.datetime.as_ref().unwrap_or_else(|| super::query::TimestampField::default_instance()) + } + pub fn clear_datetime(&mut self) { + self.datetime.clear(); + } + + pub fn has_datetime(&self) -> bool { + self.datetime.is_some() + } + + // Param is passed by value, moved + pub fn set_datetime(&mut self, v: super::query::TimestampField) { + self.datetime = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_datetime(&mut self) -> &mut super::query::TimestampField { + if self.datetime.is_none() { + self.datetime.set_default(); + } + self.datetime.as_mut().unwrap() + } + + // Take field + pub fn take_datetime(&mut self) -> super::query::TimestampField { + self.datetime.take().unwrap_or_else(|| super::query::TimestampField::new()) + } + + // .epl.protobuf.TimestampField observed = 7; + + + pub fn get_observed(&self) -> &super::query::TimestampField { + self.observed.as_ref().unwrap_or_else(|| super::query::TimestampField::default_instance()) + } + pub fn clear_observed(&mut self) { + self.observed.clear(); + } + + pub fn has_observed(&self) -> bool { + self.observed.is_some() + } + + // Param is passed by value, moved + pub fn set_observed(&mut self, v: super::query::TimestampField) { + self.observed = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_observed(&mut self) -> &mut super::query::TimestampField { + if self.observed.is_none() { + self.observed.set_default(); + } + self.observed.as_mut().unwrap() + } + + // Take field + pub fn take_observed(&mut self) -> super::query::TimestampField { + self.observed.take().unwrap_or_else(|| super::query::TimestampField::new()) + } + + // .epl.protobuf.TimestampField processed = 8; + + + pub fn get_processed(&self) -> &super::query::TimestampField { + self.processed.as_ref().unwrap_or_else(|| super::query::TimestampField::default_instance()) + } + pub fn clear_processed(&mut self) { + self.processed.clear(); + } + + pub fn has_processed(&self) -> bool { + self.processed.is_some() + } + + // Param is passed by value, moved + pub fn set_processed(&mut self, v: super::query::TimestampField) { + self.processed = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_processed(&mut self) -> &mut super::query::TimestampField { + if self.processed.is_none() { + self.processed.set_default(); + } + self.processed.as_mut().unwrap() + } + + // Take field + pub fn take_processed(&mut self) -> super::query::TimestampField { + self.processed.take().unwrap_or_else(|| super::query::TimestampField::new()) + } + + // .epl.protobuf.TimestampField updated = 9; + + + pub fn get_updated(&self) -> &super::query::TimestampField { + self.updated.as_ref().unwrap_or_else(|| super::query::TimestampField::default_instance()) + } + pub fn clear_updated(&mut self) { + self.updated.clear(); + } + + pub fn has_updated(&self) -> bool { + self.updated.is_some() + } + + // Param is passed by value, moved + pub fn set_updated(&mut self, v: super::query::TimestampField) { + self.updated = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_updated(&mut self) -> &mut super::query::TimestampField { + if self.updated.is_none() { + self.updated.set_default(); + } + self.updated.as_mut().unwrap() + } + + // Take field + pub fn take_updated(&mut self) -> super::query::TimestampField { + self.updated.take().unwrap_or_else(|| super::query::TimestampField::new()) + } + + // .epl.protobuf.EoRequest eo = 10; + + + pub fn get_eo(&self) -> &EoRequest { + self.eo.as_ref().unwrap_or_else(|| EoRequest::default_instance()) + } + pub fn clear_eo(&mut self) { + self.eo.clear(); + } + + pub fn has_eo(&self) -> bool { + self.eo.is_some() + } + + // Param is passed by value, moved + pub fn set_eo(&mut self, v: EoRequest) { + self.eo = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_eo(&mut self) -> &mut EoRequest { + if self.eo.is_none() { + self.eo.set_default(); + } + self.eo.as_mut().unwrap() + } + + // Take field + pub fn take_eo(&mut self) -> EoRequest { + self.eo.take().unwrap_or_else(|| EoRequest::new()) + } + + // uint32 limit = 11; + + + pub fn get_limit(&self) -> u32 { + self.limit + } + pub fn clear_limit(&mut self) { + self.limit = 0; + } + + // Param is passed by value, moved + pub fn set_limit(&mut self, v: u32) { + self.limit = v; + } + + // uint64 offset = 12; + + + pub fn get_offset(&self) -> u64 { + self.offset + } + pub fn clear_offset(&mut self) { + self.offset = 0; + } + + // Param is passed by value, moved + pub fn set_offset(&mut self, v: u64) { + self.offset = v; + } + + // .epl.protobuf.LandsatRequest landsat = 13; + + + pub fn get_landsat(&self) -> &LandsatRequest { + self.landsat.as_ref().unwrap_or_else(|| LandsatRequest::default_instance()) + } + pub fn clear_landsat(&mut self) { + self.landsat.clear(); + } + + pub fn has_landsat(&self) -> bool { + self.landsat.is_some() + } + + // Param is passed by value, moved + pub fn set_landsat(&mut self, v: LandsatRequest) { + self.landsat = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_landsat(&mut self) -> &mut LandsatRequest { + if self.landsat.is_none() { + self.landsat.set_default(); + } + self.landsat.as_mut().unwrap() + } + + // Take field + pub fn take_landsat(&mut self) -> LandsatRequest { + self.landsat.take().unwrap_or_else(|| LandsatRequest::new()) + } + + // string collection = 14; + + + pub fn get_collection(&self) -> &str { + &self.collection + } + pub fn clear_collection(&mut self) { + self.collection.clear(); + } + + // Param is passed by value, moved + pub fn set_collection(&mut self, v: ::std::string::String) { + self.collection = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_collection(&mut self) -> &mut ::std::string::String { + &mut self.collection + } + + // Take field + pub fn take_collection(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.collection, ::std::string::String::new()) + } + + // .epl.protobuf.StringField id_complex = 15; + + + pub fn get_id_complex(&self) -> &super::query::StringField { + self.id_complex.as_ref().unwrap_or_else(|| super::query::StringField::default_instance()) + } + pub fn clear_id_complex(&mut self) { + self.id_complex.clear(); + } + + pub fn has_id_complex(&self) -> bool { + self.id_complex.is_some() + } + + // Param is passed by value, moved + pub fn set_id_complex(&mut self, v: super::query::StringField) { + self.id_complex = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id_complex(&mut self) -> &mut super::query::StringField { + if self.id_complex.is_none() { + self.id_complex.set_default(); + } + self.id_complex.as_mut().unwrap() + } + + // Take field + pub fn take_id_complex(&mut self) -> super::query::StringField { + self.id_complex.take().unwrap_or_else(|| super::query::StringField::new()) + } +} + +impl ::protobuf::Message for StacRequest { + fn is_initialized(&self) -> bool { + for v in &self.geometry { + if !v.is_initialized() { + return false; + } + }; + for v in &self.bbox { + if !v.is_initialized() { + return false; + } + }; + for v in &self.geometry_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.properties { + if !v.is_initialized() { + return false; + } + }; + for v in &self.datetime { + if !v.is_initialized() { + return false; + } + }; + for v in &self.observed { + if !v.is_initialized() { + return false; + } + }; + for v in &self.processed { + if !v.is_initialized() { + return false; + } + }; + for v in &self.updated { + if !v.is_initialized() { + return false; + } + }; + for v in &self.eo { + if !v.is_initialized() { + return false; + } + }; + for v in &self.landsat { + if !v.is_initialized() { + return false; + } + }; + for v in &self.id_complex { + 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_string_into(wire_type, is, &mut self.id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.geometry)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.bbox)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.geometry_request)?; + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.properties)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.datetime)?; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.observed)?; + }, + 8 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.processed)?; + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.updated)?; + }, + 10 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.eo)?; + }, + 11 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.limit = tmp; + }, + 12 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.offset = tmp; + }, + 13 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.landsat)?; + }, + 14 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.collection)?; + }, + 15 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.id_complex)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id); + } + if let Some(ref v) = self.geometry.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.bbox.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.geometry_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.properties.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.datetime.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.observed.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.processed.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.updated.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.eo.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.limit != 0 { + my_size += ::protobuf::rt::value_size(11, self.limit, ::protobuf::wire_format::WireTypeVarint); + } + if self.offset != 0 { + my_size += ::protobuf::rt::value_size(12, self.offset, ::protobuf::wire_format::WireTypeVarint); + } + if let Some(ref v) = self.landsat.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if !self.collection.is_empty() { + my_size += ::protobuf::rt::string_size(14, &self.collection); + } + if let Some(ref v) = self.id_complex.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 !self.id.is_empty() { + os.write_string(1, &self.id)?; + } + if let Some(ref v) = self.geometry.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 let Some(ref v) = self.bbox.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 Some(ref v) = self.geometry_request.as_ref() { + os.write_tag(4, ::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.properties.as_ref() { + os.write_tag(5, ::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.datetime.as_ref() { + os.write_tag(6, ::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.observed.as_ref() { + os.write_tag(7, ::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.processed.as_ref() { + os.write_tag(8, ::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.updated.as_ref() { + os.write_tag(9, ::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.eo.as_ref() { + os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.limit != 0 { + os.write_uint32(11, self.limit)?; + } + if self.offset != 0 { + os.write_uint64(12, self.offset)?; + } + if let Some(ref v) = self.landsat.as_ref() { + os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.collection.is_empty() { + os.write_string(14, &self.collection)?; + } + if let Some(ref v) = self.id_complex.as_ref() { + os.write_tag(15, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StacRequest { + StacRequest::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::ProtobufTypeString>( + "id", + |m: &StacRequest| { &m.id }, + |m: &mut StacRequest| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "geometry", + |m: &StacRequest| { &m.geometry }, + |m: &mut StacRequest| { &mut m.geometry }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "bbox", + |m: &StacRequest| { &m.bbox }, + |m: &mut StacRequest| { &mut m.bbox }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "geometry_request", + |m: &StacRequest| { &m.geometry_request }, + |m: &mut StacRequest| { &mut m.geometry_request }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>( + "properties", + |m: &StacRequest| { &m.properties }, + |m: &mut StacRequest| { &mut m.properties }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "datetime", + |m: &StacRequest| { &m.datetime }, + |m: &mut StacRequest| { &mut m.datetime }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "observed", + |m: &StacRequest| { &m.observed }, + |m: &mut StacRequest| { &mut m.observed }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "processed", + |m: &StacRequest| { &m.processed }, + |m: &mut StacRequest| { &mut m.processed }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "updated", + |m: &StacRequest| { &m.updated }, + |m: &mut StacRequest| { &mut m.updated }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "eo", + |m: &StacRequest| { &m.eo }, + |m: &mut StacRequest| { &mut m.eo }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "limit", + |m: &StacRequest| { &m.limit }, + |m: &mut StacRequest| { &mut m.limit }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "offset", + |m: &StacRequest| { &m.offset }, + |m: &mut StacRequest| { &mut m.offset }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "landsat", + |m: &StacRequest| { &m.landsat }, + |m: &mut StacRequest| { &mut m.landsat }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "collection", + |m: &StacRequest| { &m.collection }, + |m: &mut StacRequest| { &mut m.collection }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "id_complex", + |m: &StacRequest| { &m.id_complex }, + |m: &mut StacRequest| { &mut m.id_complex }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "StacRequest", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static StacRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const StacRequest, + }; + unsafe { + instance.get(StacRequest::new) + } + } +} + +impl ::protobuf::Clear for StacRequest { + fn clear(&mut self) { + self.id.clear(); + self.geometry.clear(); + self.bbox.clear(); + self.geometry_request.clear(); + self.properties.clear(); + self.datetime.clear(); + self.observed.clear(); + self.processed.clear(); + self.updated.clear(); + self.eo.clear(); + self.limit = 0; + self.offset = 0; + self.landsat.clear(); + self.collection.clear(); + self.id_complex.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for StacRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for StacRequest { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct Asset { + // message fields + pub href: ::std::string::String, + pub field_type: ::std::string::String, + pub eo_bands: Eo_Band, + pub asset_type: AssetType, + pub cloud_platform: CloudPlatform, + pub bucket_manager: ::std::string::String, + pub bucket_region: ::std::string::String, + pub bucket: ::std::string::String, + pub object_path: ::std::string::String, + pub requester_pays: bool, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Asset { + fn default() -> &'a Asset { + ::default_instance() + } +} + +impl Asset { + pub fn new() -> Asset { + ::std::default::Default::default() + } + + // string href = 1; + + + pub fn get_href(&self) -> &str { + &self.href + } + pub fn clear_href(&mut self) { + self.href.clear(); + } + + // Param is passed by value, moved + pub fn set_href(&mut self, v: ::std::string::String) { + self.href = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_href(&mut self) -> &mut ::std::string::String { + &mut self.href + } + + // Take field + pub fn take_href(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.href, ::std::string::String::new()) + } + + // string type = 2; + + + pub fn get_field_type(&self) -> &str { + &self.field_type + } + pub fn clear_field_type(&mut self) { + self.field_type.clear(); + } + + // Param is passed by value, moved + pub fn set_field_type(&mut self, v: ::std::string::String) { + self.field_type = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_field_type(&mut self) -> &mut ::std::string::String { + &mut self.field_type + } + + // Take field + pub fn take_field_type(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.field_type, ::std::string::String::new()) + } + + // .epl.protobuf.Eo.Band eo_bands = 3; + + + pub fn get_eo_bands(&self) -> Eo_Band { + self.eo_bands + } + pub fn clear_eo_bands(&mut self) { + self.eo_bands = Eo_Band::UNKNOWN_BAND; + } + + // Param is passed by value, moved + pub fn set_eo_bands(&mut self, v: Eo_Band) { + self.eo_bands = v; + } + + // .epl.protobuf.AssetType asset_type = 4; + + + pub fn get_asset_type(&self) -> AssetType { + self.asset_type + } + pub fn clear_asset_type(&mut self) { + self.asset_type = AssetType::UNKNOWN_ASSET; + } + + // Param is passed by value, moved + pub fn set_asset_type(&mut self, v: AssetType) { + self.asset_type = v; + } + + // .epl.protobuf.CloudPlatform cloud_platform = 5; + + + pub fn get_cloud_platform(&self) -> CloudPlatform { + self.cloud_platform + } + pub fn clear_cloud_platform(&mut self) { + self.cloud_platform = CloudPlatform::UNKNOWN_CLOUD_PLATFORM; + } + + // Param is passed by value, moved + pub fn set_cloud_platform(&mut self, v: CloudPlatform) { + self.cloud_platform = v; + } + + // string bucket_manager = 6; + + + pub fn get_bucket_manager(&self) -> &str { + &self.bucket_manager + } + pub fn clear_bucket_manager(&mut self) { + self.bucket_manager.clear(); + } + + // Param is passed by value, moved + pub fn set_bucket_manager(&mut self, v: ::std::string::String) { + self.bucket_manager = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_bucket_manager(&mut self) -> &mut ::std::string::String { + &mut self.bucket_manager + } + + // Take field + pub fn take_bucket_manager(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.bucket_manager, ::std::string::String::new()) + } + + // string bucket_region = 7; + + + pub fn get_bucket_region(&self) -> &str { + &self.bucket_region + } + pub fn clear_bucket_region(&mut self) { + self.bucket_region.clear(); + } + + // Param is passed by value, moved + pub fn set_bucket_region(&mut self, v: ::std::string::String) { + self.bucket_region = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_bucket_region(&mut self) -> &mut ::std::string::String { + &mut self.bucket_region + } + + // Take field + pub fn take_bucket_region(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.bucket_region, ::std::string::String::new()) + } + + // string bucket = 8; + + + pub fn get_bucket(&self) -> &str { + &self.bucket + } + pub fn clear_bucket(&mut self) { + self.bucket.clear(); + } + + // Param is passed by value, moved + pub fn set_bucket(&mut self, v: ::std::string::String) { + self.bucket = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_bucket(&mut self) -> &mut ::std::string::String { + &mut self.bucket + } + + // Take field + pub fn take_bucket(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.bucket, ::std::string::String::new()) + } + + // string object_path = 9; + + + pub fn get_object_path(&self) -> &str { + &self.object_path + } + pub fn clear_object_path(&mut self) { + self.object_path.clear(); + } + + // Param is passed by value, moved + pub fn set_object_path(&mut self, v: ::std::string::String) { + self.object_path = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_object_path(&mut self) -> &mut ::std::string::String { + &mut self.object_path + } + + // Take field + pub fn take_object_path(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.object_path, ::std::string::String::new()) + } + + // bool requester_pays = 10; + + + pub fn get_requester_pays(&self) -> bool { + self.requester_pays + } + pub fn clear_requester_pays(&mut self) { + self.requester_pays = false; + } + + // Param is passed by value, moved + pub fn set_requester_pays(&mut self, v: bool) { + self.requester_pays = v; + } +} + +impl ::protobuf::Message for Asset { + 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_string_into(wire_type, is, &mut self.href)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.eo_bands, 3, &mut self.unknown_fields)? + }, + 4 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.asset_type, 4, &mut self.unknown_fields)? + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.cloud_platform, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.bucket_manager)?; + }, + 7 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.bucket_region)?; + }, + 8 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.bucket)?; + }, + 9 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.object_path)?; + }, + 10 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.requester_pays = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.href.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.href); + } + if !self.field_type.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.field_type); + } + if self.eo_bands != Eo_Band::UNKNOWN_BAND { + my_size += ::protobuf::rt::enum_size(3, self.eo_bands); + } + if self.asset_type != AssetType::UNKNOWN_ASSET { + my_size += ::protobuf::rt::enum_size(4, self.asset_type); + } + if self.cloud_platform != CloudPlatform::UNKNOWN_CLOUD_PLATFORM { + my_size += ::protobuf::rt::enum_size(5, self.cloud_platform); + } + if !self.bucket_manager.is_empty() { + my_size += ::protobuf::rt::string_size(6, &self.bucket_manager); + } + if !self.bucket_region.is_empty() { + my_size += ::protobuf::rt::string_size(7, &self.bucket_region); + } + if !self.bucket.is_empty() { + my_size += ::protobuf::rt::string_size(8, &self.bucket); + } + if !self.object_path.is_empty() { + my_size += ::protobuf::rt::string_size(9, &self.object_path); + } + if self.requester_pays != false { + my_size += 2; + } + 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.href.is_empty() { + os.write_string(1, &self.href)?; + } + if !self.field_type.is_empty() { + os.write_string(2, &self.field_type)?; + } + if self.eo_bands != Eo_Band::UNKNOWN_BAND { + os.write_enum(3, self.eo_bands.value())?; + } + if self.asset_type != AssetType::UNKNOWN_ASSET { + os.write_enum(4, self.asset_type.value())?; + } + if self.cloud_platform != CloudPlatform::UNKNOWN_CLOUD_PLATFORM { + os.write_enum(5, self.cloud_platform.value())?; + } + if !self.bucket_manager.is_empty() { + os.write_string(6, &self.bucket_manager)?; + } + if !self.bucket_region.is_empty() { + os.write_string(7, &self.bucket_region)?; + } + if !self.bucket.is_empty() { + os.write_string(8, &self.bucket)?; + } + if !self.object_path.is_empty() { + os.write_string(9, &self.object_path)?; + } + if self.requester_pays != false { + os.write_bool(10, self.requester_pays)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Asset { + Asset::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::ProtobufTypeString>( + "href", + |m: &Asset| { &m.href }, + |m: &mut Asset| { &mut m.href }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "type", + |m: &Asset| { &m.field_type }, + |m: &mut Asset| { &mut m.field_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "eo_bands", + |m: &Asset| { &m.eo_bands }, + |m: &mut Asset| { &mut m.eo_bands }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "asset_type", + |m: &Asset| { &m.asset_type }, + |m: &mut Asset| { &mut m.asset_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "cloud_platform", + |m: &Asset| { &m.cloud_platform }, + |m: &mut Asset| { &mut m.cloud_platform }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "bucket_manager", + |m: &Asset| { &m.bucket_manager }, + |m: &mut Asset| { &mut m.bucket_manager }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "bucket_region", + |m: &Asset| { &m.bucket_region }, + |m: &mut Asset| { &mut m.bucket_region }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "bucket", + |m: &Asset| { &m.bucket }, + |m: &mut Asset| { &mut m.bucket }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "object_path", + |m: &Asset| { &m.object_path }, + |m: &mut Asset| { &mut m.object_path }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "requester_pays", + |m: &Asset| { &m.requester_pays }, + |m: &mut Asset| { &mut m.requester_pays }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "Asset", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static Asset { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const Asset, + }; + unsafe { + instance.get(Asset::new) + } + } +} + +impl ::protobuf::Clear for Asset { + fn clear(&mut self) { + self.href.clear(); + self.field_type.clear(); + self.eo_bands = Eo_Band::UNKNOWN_BAND; + self.asset_type = AssetType::UNKNOWN_ASSET; + self.cloud_platform = CloudPlatform::UNKNOWN_CLOUD_PLATFORM; + self.bucket_manager.clear(); + self.bucket_region.clear(); + self.bucket.clear(); + self.object_path.clear(); + self.requester_pays = false; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for Asset { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Asset { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct DatetimeRange { + // message fields + pub start: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + pub end: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a DatetimeRange { + fn default() -> &'a DatetimeRange { + ::default_instance() + } +} + +impl DatetimeRange { + pub fn new() -> DatetimeRange { + ::std::default::Default::default() + } + + // .google.protobuf.Timestamp start = 1; + + + pub fn get_start(&self) -> &::protobuf::well_known_types::Timestamp { + self.start.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_start(&mut self) { + self.start.clear(); + } + + pub fn has_start(&self) -> bool { + self.start.is_some() + } + + // Param is passed by value, moved + pub fn set_start(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.start = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_start(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.start.is_none() { + self.start.set_default(); + } + self.start.as_mut().unwrap() + } + + // Take field + pub fn take_start(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.start.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } + + // .google.protobuf.Timestamp end = 2; + + + pub fn get_end(&self) -> &::protobuf::well_known_types::Timestamp { + self.end.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + } + pub fn clear_end(&mut self) { + self.end.clear(); + } + + pub fn has_end(&self) -> bool { + self.end.is_some() + } + + // Param is passed by value, moved + pub fn set_end(&mut self, v: ::protobuf::well_known_types::Timestamp) { + self.end = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_end(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { + if self.end.is_none() { + self.end.set_default(); + } + self.end.as_mut().unwrap() + } + + // Take field + pub fn take_end(&mut self) -> ::protobuf::well_known_types::Timestamp { + self.end.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + } +} + +impl ::protobuf::Message for DatetimeRange { + fn is_initialized(&self) -> bool { + for v in &self.start { + if !v.is_initialized() { + return false; + } + }; + for v in &self.end { + 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.start)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.end)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.start.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.end.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.start.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.end.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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> DatetimeRange { + DatetimeRange::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<::protobuf::well_known_types::Timestamp>>( + "start", + |m: &DatetimeRange| { &m.start }, + |m: &mut DatetimeRange| { &mut m.start }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "end", + |m: &DatetimeRange| { &m.end }, + |m: &mut DatetimeRange| { &mut m.end }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "DatetimeRange", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static DatetimeRange { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const DatetimeRange, + }; + unsafe { + instance.get(DatetimeRange::new) + } + } +} + +impl ::protobuf::Clear for DatetimeRange { + fn clear(&mut self) { + self.start.clear(); + self.end.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for DatetimeRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DatetimeRange { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct StacDbResponse { + // message fields + pub status: ::std::string::String, + pub status_code: i32, + pub data_id: ::std::string::String, + pub count: u64, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StacDbResponse { + fn default() -> &'a StacDbResponse { + ::default_instance() + } +} + +impl StacDbResponse { + pub fn new() -> StacDbResponse { + ::std::default::Default::default() + } + + // string status = 1; + + + pub fn get_status(&self) -> &str { + &self.status + } + pub fn clear_status(&mut self) { + self.status.clear(); + } + + // Param is passed by value, moved + pub fn set_status(&mut self, v: ::std::string::String) { + self.status = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_status(&mut self) -> &mut ::std::string::String { + &mut self.status + } + + // Take field + pub fn take_status(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.status, ::std::string::String::new()) + } + + // int32 status_code = 2; + + + pub fn get_status_code(&self) -> i32 { + self.status_code + } + pub fn clear_status_code(&mut self) { + self.status_code = 0; + } + + // Param is passed by value, moved + pub fn set_status_code(&mut self, v: i32) { + self.status_code = v; + } + + // string data_id = 3; + + + pub fn get_data_id(&self) -> &str { + &self.data_id + } + pub fn clear_data_id(&mut self) { + self.data_id.clear(); + } + + // Param is passed by value, moved + pub fn set_data_id(&mut self, v: ::std::string::String) { + self.data_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_data_id(&mut self) -> &mut ::std::string::String { + &mut self.data_id + } + + // Take field + pub fn take_data_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.data_id, ::std::string::String::new()) + } + + // uint64 count = 4; + + + pub fn get_count(&self) -> u64 { + self.count + } + pub fn clear_count(&mut self) { + self.count = 0; + } + + // Param is passed by value, moved + pub fn set_count(&mut self, v: u64) { + self.count = v; + } +} + +impl ::protobuf::Message for StacDbResponse { + 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_string_into(wire_type, is, &mut self.status)?; + }, + 2 => { + 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.status_code = tmp; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data_id)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.count = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.status.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.status); + } + if self.status_code != 0 { + my_size += ::protobuf::rt::value_size(2, self.status_code, ::protobuf::wire_format::WireTypeVarint); + } + if !self.data_id.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.data_id); + } + if self.count != 0 { + my_size += ::protobuf::rt::value_size(4, self.count, ::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<()> { + if !self.status.is_empty() { + os.write_string(1, &self.status)?; + } + if self.status_code != 0 { + os.write_int32(2, self.status_code)?; + } + if !self.data_id.is_empty() { + os.write_string(3, &self.data_id)?; + } + if self.count != 0 { + os.write_uint64(4, self.count)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StacDbResponse { + StacDbResponse::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::ProtobufTypeString>( + "status", + |m: &StacDbResponse| { &m.status }, + |m: &mut StacDbResponse| { &mut m.status }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "status_code", + |m: &StacDbResponse| { &m.status_code }, + |m: &mut StacDbResponse| { &mut m.status_code }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "data_id", + |m: &StacDbResponse| { &m.data_id }, + |m: &mut StacDbResponse| { &mut m.data_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "count", + |m: &StacDbResponse| { &m.count }, + |m: &mut StacDbResponse| { &mut m.count }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "StacDbResponse", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static StacDbResponse { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const StacDbResponse, + }; + unsafe { + instance.get(StacDbResponse::new) + } + } +} + +impl ::protobuf::Clear for StacDbResponse { + fn clear(&mut self) { + self.status.clear(); + self.status_code = 0; + self.data_id.clear(); + self.count = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for StacDbResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for StacDbResponse { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct Sar { + // message fields + pub platform: Sar_Platform, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Sar { + fn default() -> &'a Sar { + ::default_instance() + } +} + +impl Sar { + pub fn new() -> Sar { + ::std::default::Default::default() + } + + // .epl.protobuf.Sar.Platform platform = 1; + + + pub fn get_platform(&self) -> Sar_Platform { + self.platform + } + pub fn clear_platform(&mut self) { + self.platform = Sar_Platform::UNKNOWN_PLATFORM; + } + + // Param is passed by value, moved + pub fn set_platform(&mut self, v: Sar_Platform) { + self.platform = v; + } +} + +impl ::protobuf::Message for Sar { + 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.platform, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.platform != Sar_Platform::UNKNOWN_PLATFORM { + my_size += ::protobuf::rt::enum_size(1, self.platform); + } + 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.platform != Sar_Platform::UNKNOWN_PLATFORM { + os.write_enum(1, self.platform.value())?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Sar { + Sar::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::ProtobufTypeEnum>( + "platform", + |m: &Sar| { &m.platform }, + |m: &mut Sar| { &mut m.platform }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "Sar", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static Sar { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const Sar, + }; + unsafe { + instance.get(Sar::new) + } + } +} + +impl ::protobuf::Clear for Sar { + fn clear(&mut self) { + self.platform = Sar_Platform::UNKNOWN_PLATFORM; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for Sar { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Sar { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Sar_Platform { + UNKNOWN_PLATFORM = 0, + ENVISAT = 1, + SENTINEL_1A = 2, +} + +impl ::protobuf::ProtobufEnum for Sar_Platform { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Sar_Platform::UNKNOWN_PLATFORM), + 1 => ::std::option::Option::Some(Sar_Platform::ENVISAT), + 2 => ::std::option::Option::Some(Sar_Platform::SENTINEL_1A), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Sar_Platform] = &[ + Sar_Platform::UNKNOWN_PLATFORM, + Sar_Platform::ENVISAT, + Sar_Platform::SENTINEL_1A, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Sar_Platform", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Sar_Platform { +} + +impl ::std::default::Default for Sar_Platform { + fn default() -> Self { + Sar_Platform::UNKNOWN_PLATFORM + } +} + +impl ::protobuf::reflect::ProtobufValue for Sar_Platform { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Sar_Instrument { + UNKNOWN_INSTRUMENT = 0, +} + +impl ::protobuf::ProtobufEnum for Sar_Instrument { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Sar_Instrument::UNKNOWN_INSTRUMENT), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Sar_Instrument] = &[ + Sar_Instrument::UNKNOWN_INSTRUMENT, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Sar_Instrument", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Sar_Instrument { +} + +impl ::std::default::Default for Sar_Instrument { + fn default() -> Self { + Sar_Instrument::UNKNOWN_INSTRUMENT + } +} + +impl ::protobuf::reflect::ProtobufValue for Sar_Instrument { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct Eo { + // message fields + pub epsg: u32, + pub platform: Eo_Platform, + pub instrument: Eo_Instrument, + pub constellation: Eo_Constellation, + pub sun_azimuth: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub sun_elevation: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub gsd: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub off_nadir: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub azimuth: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub cloud_cover: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + pub bands: Eo_Band, + pub sr: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Eo { + fn default() -> &'a Eo { + ::default_instance() + } +} + +impl Eo { + pub fn new() -> Eo { + ::std::default::Default::default() + } + + // uint32 epsg = 1; + + + pub fn get_epsg(&self) -> u32 { + self.epsg + } + pub fn clear_epsg(&mut self) { + self.epsg = 0; + } + + // Param is passed by value, moved + pub fn set_epsg(&mut self, v: u32) { + self.epsg = v; + } + + // .epl.protobuf.Eo.Platform platform = 2; + + + pub fn get_platform(&self) -> Eo_Platform { + self.platform + } + pub fn clear_platform(&mut self) { + self.platform = Eo_Platform::UNKNOWN_PLATFORM; + } + + // Param is passed by value, moved + pub fn set_platform(&mut self, v: Eo_Platform) { + self.platform = v; + } + + // .epl.protobuf.Eo.Instrument instrument = 3; + + + pub fn get_instrument(&self) -> Eo_Instrument { + self.instrument + } + pub fn clear_instrument(&mut self) { + self.instrument = Eo_Instrument::UNKNOWN_INSTRUMENT; + } + + // Param is passed by value, moved + pub fn set_instrument(&mut self, v: Eo_Instrument) { + self.instrument = v; + } + + // .epl.protobuf.Eo.Constellation constellation = 4; + + + pub fn get_constellation(&self) -> Eo_Constellation { + self.constellation + } + pub fn clear_constellation(&mut self) { + self.constellation = Eo_Constellation::UNKNOWN_CONSTELLATION; + } + + // Param is passed by value, moved + pub fn set_constellation(&mut self, v: Eo_Constellation) { + self.constellation = v; + } + + // .google.protobuf.FloatValue sun_azimuth = 5; + + + pub fn get_sun_azimuth(&self) -> &::protobuf::well_known_types::FloatValue { + self.sun_azimuth.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_sun_azimuth(&mut self) { + self.sun_azimuth.clear(); + } + + pub fn has_sun_azimuth(&self) -> bool { + self.sun_azimuth.is_some() + } + + // Param is passed by value, moved + pub fn set_sun_azimuth(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.sun_azimuth = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sun_azimuth(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.sun_azimuth.is_none() { + self.sun_azimuth.set_default(); + } + self.sun_azimuth.as_mut().unwrap() + } + + // Take field + pub fn take_sun_azimuth(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.sun_azimuth.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .google.protobuf.FloatValue sun_elevation = 6; + + + pub fn get_sun_elevation(&self) -> &::protobuf::well_known_types::FloatValue { + self.sun_elevation.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_sun_elevation(&mut self) { + self.sun_elevation.clear(); + } + + pub fn has_sun_elevation(&self) -> bool { + self.sun_elevation.is_some() + } + + // Param is passed by value, moved + pub fn set_sun_elevation(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.sun_elevation = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sun_elevation(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.sun_elevation.is_none() { + self.sun_elevation.set_default(); + } + self.sun_elevation.as_mut().unwrap() + } + + // Take field + pub fn take_sun_elevation(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.sun_elevation.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .google.protobuf.FloatValue gsd = 7; + + + pub fn get_gsd(&self) -> &::protobuf::well_known_types::FloatValue { + self.gsd.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_gsd(&mut self) { + self.gsd.clear(); + } + + pub fn has_gsd(&self) -> bool { + self.gsd.is_some() + } + + // Param is passed by value, moved + pub fn set_gsd(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.gsd = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_gsd(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.gsd.is_none() { + self.gsd.set_default(); + } + self.gsd.as_mut().unwrap() + } + + // Take field + pub fn take_gsd(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.gsd.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .google.protobuf.FloatValue off_nadir = 8; + + + pub fn get_off_nadir(&self) -> &::protobuf::well_known_types::FloatValue { + self.off_nadir.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_off_nadir(&mut self) { + self.off_nadir.clear(); + } + + pub fn has_off_nadir(&self) -> bool { + self.off_nadir.is_some() + } + + // Param is passed by value, moved + pub fn set_off_nadir(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.off_nadir = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_off_nadir(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.off_nadir.is_none() { + self.off_nadir.set_default(); + } + self.off_nadir.as_mut().unwrap() + } + + // Take field + pub fn take_off_nadir(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.off_nadir.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .google.protobuf.FloatValue azimuth = 9; + + + pub fn get_azimuth(&self) -> &::protobuf::well_known_types::FloatValue { + self.azimuth.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_azimuth(&mut self) { + self.azimuth.clear(); + } + + pub fn has_azimuth(&self) -> bool { + self.azimuth.is_some() + } + + // Param is passed by value, moved + pub fn set_azimuth(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.azimuth = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_azimuth(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.azimuth.is_none() { + self.azimuth.set_default(); + } + self.azimuth.as_mut().unwrap() + } + + // Take field + pub fn take_azimuth(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.azimuth.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .google.protobuf.FloatValue cloud_cover = 10; + + + pub fn get_cloud_cover(&self) -> &::protobuf::well_known_types::FloatValue { + self.cloud_cover.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_cloud_cover(&mut self) { + self.cloud_cover.clear(); + } + + pub fn has_cloud_cover(&self) -> bool { + self.cloud_cover.is_some() + } + + // Param is passed by value, moved + pub fn set_cloud_cover(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.cloud_cover = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cloud_cover(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.cloud_cover.is_none() { + self.cloud_cover.set_default(); + } + self.cloud_cover.as_mut().unwrap() + } + + // Take field + pub fn take_cloud_cover(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.cloud_cover.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } + + // .epl.protobuf.Eo.Band bands = 11; + + + pub fn get_bands(&self) -> Eo_Band { + self.bands + } + pub fn clear_bands(&mut self) { + self.bands = Eo_Band::UNKNOWN_BAND; + } + + // Param is passed by value, moved + pub fn set_bands(&mut self, v: Eo_Band) { + self.bands = v; + } + + // .epl.protobuf.SpatialReferenceData sr = 12; + + + pub fn get_sr(&self) -> &super::geometry::SpatialReferenceData { + self.sr.as_ref().unwrap_or_else(|| super::geometry::SpatialReferenceData::default_instance()) + } + pub fn clear_sr(&mut self) { + self.sr.clear(); + } + + pub fn has_sr(&self) -> bool { + self.sr.is_some() + } + + // Param is passed by value, moved + pub fn set_sr(&mut self, v: super::geometry::SpatialReferenceData) { + self.sr = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sr(&mut self) -> &mut super::geometry::SpatialReferenceData { + if self.sr.is_none() { + self.sr.set_default(); + } + self.sr.as_mut().unwrap() + } + + // Take field + pub fn take_sr(&mut self) -> super::geometry::SpatialReferenceData { + self.sr.take().unwrap_or_else(|| super::geometry::SpatialReferenceData::new()) + } +} + +impl ::protobuf::Message for Eo { + fn is_initialized(&self) -> bool { + for v in &self.sun_azimuth { + if !v.is_initialized() { + return false; + } + }; + for v in &self.sun_elevation { + if !v.is_initialized() { + return false; + } + }; + for v in &self.gsd { + if !v.is_initialized() { + return false; + } + }; + for v in &self.off_nadir { + if !v.is_initialized() { + return false; + } + }; + for v in &self.azimuth { + if !v.is_initialized() { + return false; + } + }; + for v in &self.cloud_cover { + if !v.is_initialized() { + return false; + } + }; + for v in &self.sr { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.epsg = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.platform, 2, &mut self.unknown_fields)? + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.instrument, 3, &mut self.unknown_fields)? + }, + 4 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.constellation, 4, &mut self.unknown_fields)? + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sun_azimuth)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sun_elevation)?; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.gsd)?; + }, + 8 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.off_nadir)?; + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.azimuth)?; + }, + 10 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cloud_cover)?; + }, + 11 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.bands, 11, &mut self.unknown_fields)? + }, + 12 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sr)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.epsg != 0 { + my_size += ::protobuf::rt::value_size(1, self.epsg, ::protobuf::wire_format::WireTypeVarint); + } + if self.platform != Eo_Platform::UNKNOWN_PLATFORM { + my_size += ::protobuf::rt::enum_size(2, self.platform); + } + if self.instrument != Eo_Instrument::UNKNOWN_INSTRUMENT { + my_size += ::protobuf::rt::enum_size(3, self.instrument); + } + if self.constellation != Eo_Constellation::UNKNOWN_CONSTELLATION { + my_size += ::protobuf::rt::enum_size(4, self.constellation); + } + if let Some(ref v) = self.sun_azimuth.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.sun_elevation.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.gsd.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.off_nadir.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.azimuth.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.cloud_cover.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.bands != Eo_Band::UNKNOWN_BAND { + my_size += ::protobuf::rt::enum_size(11, self.bands); + } + if let Some(ref v) = self.sr.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 self.epsg != 0 { + os.write_uint32(1, self.epsg)?; + } + if self.platform != Eo_Platform::UNKNOWN_PLATFORM { + os.write_enum(2, self.platform.value())?; + } + if self.instrument != Eo_Instrument::UNKNOWN_INSTRUMENT { + os.write_enum(3, self.instrument.value())?; + } + if self.constellation != Eo_Constellation::UNKNOWN_CONSTELLATION { + os.write_enum(4, self.constellation.value())?; + } + if let Some(ref v) = self.sun_azimuth.as_ref() { + os.write_tag(5, ::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.sun_elevation.as_ref() { + os.write_tag(6, ::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.gsd.as_ref() { + os.write_tag(7, ::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.off_nadir.as_ref() { + os.write_tag(8, ::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.azimuth.as_ref() { + os.write_tag(9, ::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.cloud_cover.as_ref() { + os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.bands != Eo_Band::UNKNOWN_BAND { + os.write_enum(11, self.bands.value())?; + } + if let Some(ref v) = self.sr.as_ref() { + os.write_tag(12, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Eo { + Eo::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::ProtobufTypeUint32>( + "epsg", + |m: &Eo| { &m.epsg }, + |m: &mut Eo| { &mut m.epsg }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "platform", + |m: &Eo| { &m.platform }, + |m: &mut Eo| { &mut m.platform }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "instrument", + |m: &Eo| { &m.instrument }, + |m: &mut Eo| { &mut m.instrument }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "constellation", + |m: &Eo| { &m.constellation }, + |m: &mut Eo| { &mut m.constellation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "sun_azimuth", + |m: &Eo| { &m.sun_azimuth }, + |m: &mut Eo| { &mut m.sun_azimuth }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "sun_elevation", + |m: &Eo| { &m.sun_elevation }, + |m: &mut Eo| { &mut m.sun_elevation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "gsd", + |m: &Eo| { &m.gsd }, + |m: &mut Eo| { &mut m.gsd }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "off_nadir", + |m: &Eo| { &m.off_nadir }, + |m: &mut Eo| { &mut m.off_nadir }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "azimuth", + |m: &Eo| { &m.azimuth }, + |m: &mut Eo| { &mut m.azimuth }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "cloud_cover", + |m: &Eo| { &m.cloud_cover }, + |m: &mut Eo| { &mut m.cloud_cover }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "bands", + |m: &Eo| { &m.bands }, + |m: &mut Eo| { &mut m.bands }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sr", + |m: &Eo| { &m.sr }, + |m: &mut Eo| { &mut m.sr }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "Eo", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static Eo { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const Eo, + }; + unsafe { + instance.get(Eo::new) + } + } +} + +impl ::protobuf::Clear for Eo { + fn clear(&mut self) { + self.epsg = 0; + self.platform = Eo_Platform::UNKNOWN_PLATFORM; + self.instrument = Eo_Instrument::UNKNOWN_INSTRUMENT; + self.constellation = Eo_Constellation::UNKNOWN_CONSTELLATION; + self.sun_azimuth.clear(); + self.sun_elevation.clear(); + self.gsd.clear(); + self.off_nadir.clear(); + self.azimuth.clear(); + self.cloud_cover.clear(); + self.bands = Eo_Band::UNKNOWN_BAND; + self.sr.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for Eo { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Eo { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Eo_Platform { + UNKNOWN_PLATFORM = 0, + LANDSAT_1 = 2, + LANDSAT_2 = 4, + LANDSAT_3 = 8, + LANDSAT_123 = 14, + LANDSAT_4 = 16, + LANDSAT_5 = 32, + LANDSAT_45 = 48, + LANDSAT_7 = 64, + LANDSAT_8 = 128, + SWIFT_2 = 256, +} + +impl ::protobuf::ProtobufEnum for Eo_Platform { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Eo_Platform::UNKNOWN_PLATFORM), + 2 => ::std::option::Option::Some(Eo_Platform::LANDSAT_1), + 4 => ::std::option::Option::Some(Eo_Platform::LANDSAT_2), + 8 => ::std::option::Option::Some(Eo_Platform::LANDSAT_3), + 14 => ::std::option::Option::Some(Eo_Platform::LANDSAT_123), + 16 => ::std::option::Option::Some(Eo_Platform::LANDSAT_4), + 32 => ::std::option::Option::Some(Eo_Platform::LANDSAT_5), + 48 => ::std::option::Option::Some(Eo_Platform::LANDSAT_45), + 64 => ::std::option::Option::Some(Eo_Platform::LANDSAT_7), + 128 => ::std::option::Option::Some(Eo_Platform::LANDSAT_8), + 256 => ::std::option::Option::Some(Eo_Platform::SWIFT_2), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Eo_Platform] = &[ + Eo_Platform::UNKNOWN_PLATFORM, + Eo_Platform::LANDSAT_1, + Eo_Platform::LANDSAT_2, + Eo_Platform::LANDSAT_3, + Eo_Platform::LANDSAT_123, + Eo_Platform::LANDSAT_4, + Eo_Platform::LANDSAT_5, + Eo_Platform::LANDSAT_45, + Eo_Platform::LANDSAT_7, + Eo_Platform::LANDSAT_8, + Eo_Platform::SWIFT_2, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Eo_Platform", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Eo_Platform { +} + +impl ::std::default::Default for Eo_Platform { + fn default() -> Self { + Eo_Platform::UNKNOWN_PLATFORM + } +} + +impl ::protobuf::reflect::ProtobufValue for Eo_Platform { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Eo_Instrument { + UNKNOWN_INSTRUMENT = 0, + OLI = 2, + TIRS = 4, + OLI_TIRS = 6, + POM_1 = 8, + TM = 16, + ETM = 32, + MSS = 64, +} + +impl ::protobuf::ProtobufEnum for Eo_Instrument { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Eo_Instrument::UNKNOWN_INSTRUMENT), + 2 => ::std::option::Option::Some(Eo_Instrument::OLI), + 4 => ::std::option::Option::Some(Eo_Instrument::TIRS), + 6 => ::std::option::Option::Some(Eo_Instrument::OLI_TIRS), + 8 => ::std::option::Option::Some(Eo_Instrument::POM_1), + 16 => ::std::option::Option::Some(Eo_Instrument::TM), + 32 => ::std::option::Option::Some(Eo_Instrument::ETM), + 64 => ::std::option::Option::Some(Eo_Instrument::MSS), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Eo_Instrument] = &[ + Eo_Instrument::UNKNOWN_INSTRUMENT, + Eo_Instrument::OLI, + Eo_Instrument::TIRS, + Eo_Instrument::OLI_TIRS, + Eo_Instrument::POM_1, + Eo_Instrument::TM, + Eo_Instrument::ETM, + Eo_Instrument::MSS, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Eo_Instrument", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Eo_Instrument { +} + +impl ::std::default::Default for Eo_Instrument { + fn default() -> Self { + Eo_Instrument::UNKNOWN_INSTRUMENT + } +} + +impl ::protobuf::reflect::ProtobufValue for Eo_Instrument { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Eo_Constellation { + UNKNOWN_CONSTELLATION = 0, + LANDSAT = 2, + NAIP = 4, + PNOA = 8, + SWIFT = 16, +} + +impl ::protobuf::ProtobufEnum for Eo_Constellation { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Eo_Constellation::UNKNOWN_CONSTELLATION), + 2 => ::std::option::Option::Some(Eo_Constellation::LANDSAT), + 4 => ::std::option::Option::Some(Eo_Constellation::NAIP), + 8 => ::std::option::Option::Some(Eo_Constellation::PNOA), + 16 => ::std::option::Option::Some(Eo_Constellation::SWIFT), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Eo_Constellation] = &[ + Eo_Constellation::UNKNOWN_CONSTELLATION, + Eo_Constellation::LANDSAT, + Eo_Constellation::NAIP, + Eo_Constellation::PNOA, + Eo_Constellation::SWIFT, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Eo_Constellation", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Eo_Constellation { +} + +impl ::std::default::Default for Eo_Constellation { + fn default() -> Self { + Eo_Constellation::UNKNOWN_CONSTELLATION + } +} + +impl ::protobuf::reflect::ProtobufValue for Eo_Constellation { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Eo_Band { + UNKNOWN_BAND = 0, + COASTAL = 2, + BLUE = 4, + GREEN = 8, + RED = 16, + RGB = 28, + NIR = 32, + NIR_2 = 33, + RGBIR = 60, + SWIR_1 = 64, + SWIR_2 = 128, + PAN = 256, + CIRRUS = 512, + LWIR_1 = 1024, + LWIR_2 = 2048, +} + +impl ::protobuf::ProtobufEnum for Eo_Band { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Eo_Band::UNKNOWN_BAND), + 2 => ::std::option::Option::Some(Eo_Band::COASTAL), + 4 => ::std::option::Option::Some(Eo_Band::BLUE), + 8 => ::std::option::Option::Some(Eo_Band::GREEN), + 16 => ::std::option::Option::Some(Eo_Band::RED), + 28 => ::std::option::Option::Some(Eo_Band::RGB), + 32 => ::std::option::Option::Some(Eo_Band::NIR), + 33 => ::std::option::Option::Some(Eo_Band::NIR_2), + 60 => ::std::option::Option::Some(Eo_Band::RGBIR), + 64 => ::std::option::Option::Some(Eo_Band::SWIR_1), + 128 => ::std::option::Option::Some(Eo_Band::SWIR_2), + 256 => ::std::option::Option::Some(Eo_Band::PAN), + 512 => ::std::option::Option::Some(Eo_Band::CIRRUS), + 1024 => ::std::option::Option::Some(Eo_Band::LWIR_1), + 2048 => ::std::option::Option::Some(Eo_Band::LWIR_2), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Eo_Band] = &[ + Eo_Band::UNKNOWN_BAND, + Eo_Band::COASTAL, + Eo_Band::BLUE, + Eo_Band::GREEN, + Eo_Band::RED, + Eo_Band::RGB, + Eo_Band::NIR, + Eo_Band::NIR_2, + Eo_Band::RGBIR, + Eo_Band::SWIR_1, + Eo_Band::SWIR_2, + Eo_Band::PAN, + Eo_Band::CIRRUS, + Eo_Band::LWIR_1, + Eo_Band::LWIR_2, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Eo_Band", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Eo_Band { +} + +impl ::std::default::Default for Eo_Band { + fn default() -> Self { + Eo_Band::UNKNOWN_BAND + } +} + +impl ::protobuf::reflect::ProtobufValue for Eo_Band { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct EoRequest { + // message fields + pub epsg: i32, + pub platform: Eo_Platform, + pub instrument: Eo_Instrument, + pub constellation: Eo_Constellation, + pub sun_azimuth: ::protobuf::SingularPtrField, + pub sun_elevation: ::protobuf::SingularPtrField, + pub gsd: ::protobuf::SingularPtrField, + pub off_nadir: ::protobuf::SingularPtrField, + pub azimuth: ::protobuf::SingularPtrField, + pub cloud_cover: ::protobuf::SingularPtrField, + pub bands: Eo_Band, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a EoRequest { + fn default() -> &'a EoRequest { + ::default_instance() + } +} + +impl EoRequest { + pub fn new() -> EoRequest { + ::std::default::Default::default() + } + + // int32 epsg = 1; + + + pub fn get_epsg(&self) -> i32 { + self.epsg + } + pub fn clear_epsg(&mut self) { + self.epsg = 0; + } + + // Param is passed by value, moved + pub fn set_epsg(&mut self, v: i32) { + self.epsg = v; + } + + // .epl.protobuf.Eo.Platform platform = 2; + + + pub fn get_platform(&self) -> Eo_Platform { + self.platform + } + pub fn clear_platform(&mut self) { + self.platform = Eo_Platform::UNKNOWN_PLATFORM; + } + + // Param is passed by value, moved + pub fn set_platform(&mut self, v: Eo_Platform) { + self.platform = v; + } + + // .epl.protobuf.Eo.Instrument instrument = 3; + + + pub fn get_instrument(&self) -> Eo_Instrument { + self.instrument + } + pub fn clear_instrument(&mut self) { + self.instrument = Eo_Instrument::UNKNOWN_INSTRUMENT; + } + + // Param is passed by value, moved + pub fn set_instrument(&mut self, v: Eo_Instrument) { + self.instrument = v; + } + + // .epl.protobuf.Eo.Constellation constellation = 4; + + + pub fn get_constellation(&self) -> Eo_Constellation { + self.constellation + } + pub fn clear_constellation(&mut self) { + self.constellation = Eo_Constellation::UNKNOWN_CONSTELLATION; + } + + // Param is passed by value, moved + pub fn set_constellation(&mut self, v: Eo_Constellation) { + self.constellation = v; + } + + // .epl.protobuf.FloatField sun_azimuth = 5; + + + pub fn get_sun_azimuth(&self) -> &super::query::FloatField { + self.sun_azimuth.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_sun_azimuth(&mut self) { + self.sun_azimuth.clear(); + } + + pub fn has_sun_azimuth(&self) -> bool { + self.sun_azimuth.is_some() + } + + // Param is passed by value, moved + pub fn set_sun_azimuth(&mut self, v: super::query::FloatField) { + self.sun_azimuth = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sun_azimuth(&mut self) -> &mut super::query::FloatField { + if self.sun_azimuth.is_none() { + self.sun_azimuth.set_default(); + } + self.sun_azimuth.as_mut().unwrap() + } + + // Take field + pub fn take_sun_azimuth(&mut self) -> super::query::FloatField { + self.sun_azimuth.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.FloatField sun_elevation = 6; + + + pub fn get_sun_elevation(&self) -> &super::query::FloatField { + self.sun_elevation.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_sun_elevation(&mut self) { + self.sun_elevation.clear(); + } + + pub fn has_sun_elevation(&self) -> bool { + self.sun_elevation.is_some() + } + + // Param is passed by value, moved + pub fn set_sun_elevation(&mut self, v: super::query::FloatField) { + self.sun_elevation = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sun_elevation(&mut self) -> &mut super::query::FloatField { + if self.sun_elevation.is_none() { + self.sun_elevation.set_default(); + } + self.sun_elevation.as_mut().unwrap() + } + + // Take field + pub fn take_sun_elevation(&mut self) -> super::query::FloatField { + self.sun_elevation.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.FloatField gsd = 7; + + + pub fn get_gsd(&self) -> &super::query::FloatField { + self.gsd.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_gsd(&mut self) { + self.gsd.clear(); + } + + pub fn has_gsd(&self) -> bool { + self.gsd.is_some() + } + + // Param is passed by value, moved + pub fn set_gsd(&mut self, v: super::query::FloatField) { + self.gsd = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_gsd(&mut self) -> &mut super::query::FloatField { + if self.gsd.is_none() { + self.gsd.set_default(); + } + self.gsd.as_mut().unwrap() + } + + // Take field + pub fn take_gsd(&mut self) -> super::query::FloatField { + self.gsd.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.FloatField off_nadir = 8; + + + pub fn get_off_nadir(&self) -> &super::query::FloatField { + self.off_nadir.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_off_nadir(&mut self) { + self.off_nadir.clear(); + } + + pub fn has_off_nadir(&self) -> bool { + self.off_nadir.is_some() + } + + // Param is passed by value, moved + pub fn set_off_nadir(&mut self, v: super::query::FloatField) { + self.off_nadir = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_off_nadir(&mut self) -> &mut super::query::FloatField { + if self.off_nadir.is_none() { + self.off_nadir.set_default(); + } + self.off_nadir.as_mut().unwrap() + } + + // Take field + pub fn take_off_nadir(&mut self) -> super::query::FloatField { + self.off_nadir.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.FloatField azimuth = 9; + + + pub fn get_azimuth(&self) -> &super::query::FloatField { + self.azimuth.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_azimuth(&mut self) { + self.azimuth.clear(); + } + + pub fn has_azimuth(&self) -> bool { + self.azimuth.is_some() + } + + // Param is passed by value, moved + pub fn set_azimuth(&mut self, v: super::query::FloatField) { + self.azimuth = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_azimuth(&mut self) -> &mut super::query::FloatField { + if self.azimuth.is_none() { + self.azimuth.set_default(); + } + self.azimuth.as_mut().unwrap() + } + + // Take field + pub fn take_azimuth(&mut self) -> super::query::FloatField { + self.azimuth.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.FloatField cloud_cover = 10; + + + pub fn get_cloud_cover(&self) -> &super::query::FloatField { + self.cloud_cover.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_cloud_cover(&mut self) { + self.cloud_cover.clear(); + } + + pub fn has_cloud_cover(&self) -> bool { + self.cloud_cover.is_some() + } + + // Param is passed by value, moved + pub fn set_cloud_cover(&mut self, v: super::query::FloatField) { + self.cloud_cover = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cloud_cover(&mut self) -> &mut super::query::FloatField { + if self.cloud_cover.is_none() { + self.cloud_cover.set_default(); + } + self.cloud_cover.as_mut().unwrap() + } + + // Take field + pub fn take_cloud_cover(&mut self) -> super::query::FloatField { + self.cloud_cover.take().unwrap_or_else(|| super::query::FloatField::new()) + } + + // .epl.protobuf.Eo.Band bands = 11; + + + pub fn get_bands(&self) -> Eo_Band { + self.bands + } + pub fn clear_bands(&mut self) { + self.bands = Eo_Band::UNKNOWN_BAND; + } + + // Param is passed by value, moved + pub fn set_bands(&mut self, v: Eo_Band) { + self.bands = v; + } +} + +impl ::protobuf::Message for EoRequest { + fn is_initialized(&self) -> bool { + for v in &self.sun_azimuth { + if !v.is_initialized() { + return false; + } + }; + for v in &self.sun_elevation { + if !v.is_initialized() { + return false; + } + }; + for v in &self.gsd { + if !v.is_initialized() { + return false; + } + }; + for v in &self.off_nadir { + if !v.is_initialized() { + return false; + } + }; + for v in &self.azimuth { + if !v.is_initialized() { + return false; + } + }; + for v in &self.cloud_cover { + 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 => { + 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.epsg = tmp; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.platform, 2, &mut self.unknown_fields)? + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.instrument, 3, &mut self.unknown_fields)? + }, + 4 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.constellation, 4, &mut self.unknown_fields)? + }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sun_azimuth)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sun_elevation)?; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.gsd)?; + }, + 8 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.off_nadir)?; + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.azimuth)?; + }, + 10 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cloud_cover)?; + }, + 11 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.bands, 11, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.epsg != 0 { + my_size += ::protobuf::rt::value_size(1, self.epsg, ::protobuf::wire_format::WireTypeVarint); + } + if self.platform != Eo_Platform::UNKNOWN_PLATFORM { + my_size += ::protobuf::rt::enum_size(2, self.platform); + } + if self.instrument != Eo_Instrument::UNKNOWN_INSTRUMENT { + my_size += ::protobuf::rt::enum_size(3, self.instrument); + } + if self.constellation != Eo_Constellation::UNKNOWN_CONSTELLATION { + my_size += ::protobuf::rt::enum_size(4, self.constellation); + } + if let Some(ref v) = self.sun_azimuth.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.sun_elevation.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.gsd.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.off_nadir.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.azimuth.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.cloud_cover.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.bands != Eo_Band::UNKNOWN_BAND { + my_size += ::protobuf::rt::enum_size(11, self.bands); + } + 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.epsg != 0 { + os.write_int32(1, self.epsg)?; + } + if self.platform != Eo_Platform::UNKNOWN_PLATFORM { + os.write_enum(2, self.platform.value())?; + } + if self.instrument != Eo_Instrument::UNKNOWN_INSTRUMENT { + os.write_enum(3, self.instrument.value())?; + } + if self.constellation != Eo_Constellation::UNKNOWN_CONSTELLATION { + os.write_enum(4, self.constellation.value())?; + } + if let Some(ref v) = self.sun_azimuth.as_ref() { + os.write_tag(5, ::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.sun_elevation.as_ref() { + os.write_tag(6, ::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.gsd.as_ref() { + os.write_tag(7, ::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.off_nadir.as_ref() { + os.write_tag(8, ::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.azimuth.as_ref() { + os.write_tag(9, ::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.cloud_cover.as_ref() { + os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.bands != Eo_Band::UNKNOWN_BAND { + os.write_enum(11, self.bands.value())?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> EoRequest { + EoRequest::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::ProtobufTypeInt32>( + "epsg", + |m: &EoRequest| { &m.epsg }, + |m: &mut EoRequest| { &mut m.epsg }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "platform", + |m: &EoRequest| { &m.platform }, + |m: &mut EoRequest| { &mut m.platform }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "instrument", + |m: &EoRequest| { &m.instrument }, + |m: &mut EoRequest| { &mut m.instrument }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "constellation", + |m: &EoRequest| { &m.constellation }, + |m: &mut EoRequest| { &mut m.constellation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sun_azimuth", + |m: &EoRequest| { &m.sun_azimuth }, + |m: &mut EoRequest| { &mut m.sun_azimuth }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "sun_elevation", + |m: &EoRequest| { &m.sun_elevation }, + |m: &mut EoRequest| { &mut m.sun_elevation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "gsd", + |m: &EoRequest| { &m.gsd }, + |m: &mut EoRequest| { &mut m.gsd }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "off_nadir", + |m: &EoRequest| { &m.off_nadir }, + |m: &mut EoRequest| { &mut m.off_nadir }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "azimuth", + |m: &EoRequest| { &m.azimuth }, + |m: &mut EoRequest| { &mut m.azimuth }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "cloud_cover", + |m: &EoRequest| { &m.cloud_cover }, + |m: &mut EoRequest| { &mut m.cloud_cover }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "bands", + |m: &EoRequest| { &m.bands }, + |m: &mut EoRequest| { &mut m.bands }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "EoRequest", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static EoRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const EoRequest, + }; + unsafe { + instance.get(EoRequest::new) + } + } +} + +impl ::protobuf::Clear for EoRequest { + fn clear(&mut self) { + self.epsg = 0; + self.platform = Eo_Platform::UNKNOWN_PLATFORM; + self.instrument = Eo_Instrument::UNKNOWN_INSTRUMENT; + self.constellation = Eo_Constellation::UNKNOWN_CONSTELLATION; + self.sun_azimuth.clear(); + self.sun_elevation.clear(); + self.gsd.clear(); + self.off_nadir.clear(); + self.azimuth.clear(); + self.cloud_cover.clear(); + self.bands = Eo_Band::UNKNOWN_BAND; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for EoRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for EoRequest { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct Landsat { + // message fields + pub scene_id: ::std::string::String, + pub product_id: ::std::string::String, + pub processing_level: Landsat_ProcessingLevel, + pub wrs_path: i32, + pub wrs_row: i32, + pub cloud_cover_land: ::protobuf::SingularPtrField<::protobuf::well_known_types::FloatValue>, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Landsat { + fn default() -> &'a Landsat { + ::default_instance() + } +} + +impl Landsat { + pub fn new() -> Landsat { + ::std::default::Default::default() + } + + // string scene_id = 1; + + + pub fn get_scene_id(&self) -> &str { + &self.scene_id + } + pub fn clear_scene_id(&mut self) { + self.scene_id.clear(); + } + + // Param is passed by value, moved + pub fn set_scene_id(&mut self, v: ::std::string::String) { + self.scene_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_scene_id(&mut self) -> &mut ::std::string::String { + &mut self.scene_id + } + + // Take field + pub fn take_scene_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.scene_id, ::std::string::String::new()) + } + + // string product_id = 2; + + + pub fn get_product_id(&self) -> &str { + &self.product_id + } + pub fn clear_product_id(&mut self) { + self.product_id.clear(); + } + + // Param is passed by value, moved + pub fn set_product_id(&mut self, v: ::std::string::String) { + self.product_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_product_id(&mut self) -> &mut ::std::string::String { + &mut self.product_id + } + + // Take field + pub fn take_product_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.product_id, ::std::string::String::new()) + } + + // .epl.protobuf.Landsat.ProcessingLevel processing_level = 3; + + + pub fn get_processing_level(&self) -> Landsat_ProcessingLevel { + self.processing_level + } + pub fn clear_processing_level(&mut self) { + self.processing_level = Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL; + } + + // Param is passed by value, moved + pub fn set_processing_level(&mut self, v: Landsat_ProcessingLevel) { + self.processing_level = v; + } + + // int32 wrs_path = 4; + + + pub fn get_wrs_path(&self) -> i32 { + self.wrs_path + } + pub fn clear_wrs_path(&mut self) { + self.wrs_path = 0; + } + + // Param is passed by value, moved + pub fn set_wrs_path(&mut self, v: i32) { + self.wrs_path = v; + } + + // int32 wrs_row = 5; + + + pub fn get_wrs_row(&self) -> i32 { + self.wrs_row + } + pub fn clear_wrs_row(&mut self) { + self.wrs_row = 0; + } + + // Param is passed by value, moved + pub fn set_wrs_row(&mut self, v: i32) { + self.wrs_row = v; + } + + // .google.protobuf.FloatValue cloud_cover_land = 6; + + + pub fn get_cloud_cover_land(&self) -> &::protobuf::well_known_types::FloatValue { + self.cloud_cover_land.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::default_instance()) + } + pub fn clear_cloud_cover_land(&mut self) { + self.cloud_cover_land.clear(); + } + + pub fn has_cloud_cover_land(&self) -> bool { + self.cloud_cover_land.is_some() + } + + // Param is passed by value, moved + pub fn set_cloud_cover_land(&mut self, v: ::protobuf::well_known_types::FloatValue) { + self.cloud_cover_land = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cloud_cover_land(&mut self) -> &mut ::protobuf::well_known_types::FloatValue { + if self.cloud_cover_land.is_none() { + self.cloud_cover_land.set_default(); + } + self.cloud_cover_land.as_mut().unwrap() + } + + // Take field + pub fn take_cloud_cover_land(&mut self) -> ::protobuf::well_known_types::FloatValue { + self.cloud_cover_land.take().unwrap_or_else(|| ::protobuf::well_known_types::FloatValue::new()) + } +} + +impl ::protobuf::Message for Landsat { + fn is_initialized(&self) -> bool { + for v in &self.cloud_cover_land { + 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_string_into(wire_type, is, &mut self.scene_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.product_id)?; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.processing_level, 3, &mut self.unknown_fields)? + }, + 4 => { + 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.wrs_path = tmp; + }, + 5 => { + 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.wrs_row = tmp; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cloud_cover_land)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.scene_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.scene_id); + } + if !self.product_id.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.product_id); + } + if self.processing_level != Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL { + my_size += ::protobuf::rt::enum_size(3, self.processing_level); + } + if self.wrs_path != 0 { + my_size += ::protobuf::rt::value_size(4, self.wrs_path, ::protobuf::wire_format::WireTypeVarint); + } + if self.wrs_row != 0 { + my_size += ::protobuf::rt::value_size(5, self.wrs_row, ::protobuf::wire_format::WireTypeVarint); + } + if let Some(ref v) = self.cloud_cover_land.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 !self.scene_id.is_empty() { + os.write_string(1, &self.scene_id)?; + } + if !self.product_id.is_empty() { + os.write_string(2, &self.product_id)?; + } + if self.processing_level != Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL { + os.write_enum(3, self.processing_level.value())?; + } + if self.wrs_path != 0 { + os.write_int32(4, self.wrs_path)?; + } + if self.wrs_row != 0 { + os.write_int32(5, self.wrs_row)?; + } + if let Some(ref v) = self.cloud_cover_land.as_ref() { + os.write_tag(6, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Landsat { + Landsat::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::ProtobufTypeString>( + "scene_id", + |m: &Landsat| { &m.scene_id }, + |m: &mut Landsat| { &mut m.scene_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "product_id", + |m: &Landsat| { &m.product_id }, + |m: &mut Landsat| { &mut m.product_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "processing_level", + |m: &Landsat| { &m.processing_level }, + |m: &mut Landsat| { &mut m.processing_level }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "wrs_path", + |m: &Landsat| { &m.wrs_path }, + |m: &mut Landsat| { &mut m.wrs_path }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "wrs_row", + |m: &Landsat| { &m.wrs_row }, + |m: &mut Landsat| { &mut m.wrs_row }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::FloatValue>>( + "cloud_cover_land", + |m: &Landsat| { &m.cloud_cover_land }, + |m: &mut Landsat| { &mut m.cloud_cover_land }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "Landsat", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static Landsat { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const Landsat, + }; + unsafe { + instance.get(Landsat::new) + } + } +} + +impl ::protobuf::Clear for Landsat { + fn clear(&mut self) { + self.scene_id.clear(); + self.product_id.clear(); + self.processing_level = Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL; + self.wrs_path = 0; + self.wrs_row = 0; + self.cloud_cover_land.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for Landsat { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Landsat { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum Landsat_ProcessingLevel { + UNKNOWN_PROCESSING_LEVEL = 0, + L1G = 1, + L1TP = 2, + L1T = 3, + L1GT = 4, + L1GS = 5, +} + +impl ::protobuf::ProtobufEnum for Landsat_ProcessingLevel { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL), + 1 => ::std::option::Option::Some(Landsat_ProcessingLevel::L1G), + 2 => ::std::option::Option::Some(Landsat_ProcessingLevel::L1TP), + 3 => ::std::option::Option::Some(Landsat_ProcessingLevel::L1T), + 4 => ::std::option::Option::Some(Landsat_ProcessingLevel::L1GT), + 5 => ::std::option::Option::Some(Landsat_ProcessingLevel::L1GS), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [Landsat_ProcessingLevel] = &[ + Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL, + Landsat_ProcessingLevel::L1G, + Landsat_ProcessingLevel::L1TP, + Landsat_ProcessingLevel::L1T, + Landsat_ProcessingLevel::L1GT, + Landsat_ProcessingLevel::L1GS, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("Landsat_ProcessingLevel", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for Landsat_ProcessingLevel { +} + +impl ::std::default::Default for Landsat_ProcessingLevel { + fn default() -> Self { + Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL + } +} + +impl ::protobuf::reflect::ProtobufValue for Landsat_ProcessingLevel { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(PartialEq,Clone,Default)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub struct LandsatRequest { + // message fields + pub scene_id: ::std::string::String, + pub product_id: ::std::string::String, + pub processing_level: Landsat_ProcessingLevel, + pub wrs_path: i32, + pub wrs_row: i32, + pub cloud_cover_land: ::protobuf::SingularPtrField, + // special fields + #[cfg_attr(feature = "with-serde", serde(skip))] + pub unknown_fields: ::protobuf::UnknownFields, + #[cfg_attr(feature = "with-serde", serde(skip))] + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LandsatRequest { + fn default() -> &'a LandsatRequest { + ::default_instance() + } +} + +impl LandsatRequest { + pub fn new() -> LandsatRequest { + ::std::default::Default::default() + } + + // string scene_id = 1; + + + pub fn get_scene_id(&self) -> &str { + &self.scene_id + } + pub fn clear_scene_id(&mut self) { + self.scene_id.clear(); + } + + // Param is passed by value, moved + pub fn set_scene_id(&mut self, v: ::std::string::String) { + self.scene_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_scene_id(&mut self) -> &mut ::std::string::String { + &mut self.scene_id + } + + // Take field + pub fn take_scene_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.scene_id, ::std::string::String::new()) + } + + // string product_id = 2; + + + pub fn get_product_id(&self) -> &str { + &self.product_id + } + pub fn clear_product_id(&mut self) { + self.product_id.clear(); + } + + // Param is passed by value, moved + pub fn set_product_id(&mut self, v: ::std::string::String) { + self.product_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_product_id(&mut self) -> &mut ::std::string::String { + &mut self.product_id + } + + // Take field + pub fn take_product_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.product_id, ::std::string::String::new()) + } + + // .epl.protobuf.Landsat.ProcessingLevel processing_level = 3; + + + pub fn get_processing_level(&self) -> Landsat_ProcessingLevel { + self.processing_level + } + pub fn clear_processing_level(&mut self) { + self.processing_level = Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL; + } + + // Param is passed by value, moved + pub fn set_processing_level(&mut self, v: Landsat_ProcessingLevel) { + self.processing_level = v; + } + + // int32 wrs_path = 4; + + + pub fn get_wrs_path(&self) -> i32 { + self.wrs_path + } + pub fn clear_wrs_path(&mut self) { + self.wrs_path = 0; + } + + // Param is passed by value, moved + pub fn set_wrs_path(&mut self, v: i32) { + self.wrs_path = v; + } + + // int32 wrs_row = 5; + + + pub fn get_wrs_row(&self) -> i32 { + self.wrs_row + } + pub fn clear_wrs_row(&mut self) { + self.wrs_row = 0; + } + + // Param is passed by value, moved + pub fn set_wrs_row(&mut self, v: i32) { + self.wrs_row = v; + } + + // .epl.protobuf.FloatField cloud_cover_land = 6; + + + pub fn get_cloud_cover_land(&self) -> &super::query::FloatField { + self.cloud_cover_land.as_ref().unwrap_or_else(|| super::query::FloatField::default_instance()) + } + pub fn clear_cloud_cover_land(&mut self) { + self.cloud_cover_land.clear(); + } + + pub fn has_cloud_cover_land(&self) -> bool { + self.cloud_cover_land.is_some() + } + + // Param is passed by value, moved + pub fn set_cloud_cover_land(&mut self, v: super::query::FloatField) { + self.cloud_cover_land = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cloud_cover_land(&mut self) -> &mut super::query::FloatField { + if self.cloud_cover_land.is_none() { + self.cloud_cover_land.set_default(); + } + self.cloud_cover_land.as_mut().unwrap() + } + + // Take field + pub fn take_cloud_cover_land(&mut self) -> super::query::FloatField { + self.cloud_cover_land.take().unwrap_or_else(|| super::query::FloatField::new()) + } +} + +impl ::protobuf::Message for LandsatRequest { + fn is_initialized(&self) -> bool { + for v in &self.cloud_cover_land { + 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_string_into(wire_type, is, &mut self.scene_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.product_id)?; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.processing_level, 3, &mut self.unknown_fields)? + }, + 4 => { + 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.wrs_path = tmp; + }, + 5 => { + 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.wrs_row = tmp; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cloud_cover_land)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.scene_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.scene_id); + } + if !self.product_id.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.product_id); + } + if self.processing_level != Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL { + my_size += ::protobuf::rt::enum_size(3, self.processing_level); + } + if self.wrs_path != 0 { + my_size += ::protobuf::rt::value_size(4, self.wrs_path, ::protobuf::wire_format::WireTypeVarint); + } + if self.wrs_row != 0 { + my_size += ::protobuf::rt::value_size(5, self.wrs_row, ::protobuf::wire_format::WireTypeVarint); + } + if let Some(ref v) = self.cloud_cover_land.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 !self.scene_id.is_empty() { + os.write_string(1, &self.scene_id)?; + } + if !self.product_id.is_empty() { + os.write_string(2, &self.product_id)?; + } + if self.processing_level != Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL { + os.write_enum(3, self.processing_level.value())?; + } + if self.wrs_path != 0 { + os.write_int32(4, self.wrs_path)?; + } + if self.wrs_row != 0 { + os.write_int32(5, self.wrs_row)?; + } + if let Some(ref v) = self.cloud_cover_land.as_ref() { + os.write_tag(6, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LandsatRequest { + LandsatRequest::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::ProtobufTypeString>( + "scene_id", + |m: &LandsatRequest| { &m.scene_id }, + |m: &mut LandsatRequest| { &mut m.scene_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "product_id", + |m: &LandsatRequest| { &m.product_id }, + |m: &mut LandsatRequest| { &mut m.product_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "processing_level", + |m: &LandsatRequest| { &m.processing_level }, + |m: &mut LandsatRequest| { &mut m.processing_level }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "wrs_path", + |m: &LandsatRequest| { &m.wrs_path }, + |m: &mut LandsatRequest| { &mut m.wrs_path }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "wrs_row", + |m: &LandsatRequest| { &m.wrs_row }, + |m: &mut LandsatRequest| { &mut m.wrs_row }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "cloud_cover_land", + |m: &LandsatRequest| { &m.cloud_cover_land }, + |m: &mut LandsatRequest| { &mut m.cloud_cover_land }, + )); + ::protobuf::reflect::MessageDescriptor::new::( + "LandsatRequest", + fields, + file_descriptor_proto() + ) + }) + } + } + + fn default_instance() -> &'static LandsatRequest { + static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const LandsatRequest, + }; + unsafe { + instance.get(LandsatRequest::new) + } + } +} + +impl ::protobuf::Clear for LandsatRequest { + fn clear(&mut self) { + self.scene_id.clear(); + self.product_id.clear(); + self.processing_level = Landsat_ProcessingLevel::UNKNOWN_PROCESSING_LEVEL; + self.wrs_path = 0; + self.wrs_row = 0; + self.cloud_cover_land.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for LandsatRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for LandsatRequest { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum AssetType { + UNKNOWN_ASSET = 0, + JPEG = 1, + GEOTIFF = 2, + LERC = 3, + MRF = 4, + MRF_IDX = 5, + MRF_XML = 6, + CO_GEOTIFF = 7, + RAW = 8, + THUMBNAIL = 9, + TIFF = 10, + JPEG_2000 = 11, + XML = 12, + TXT = 13, + PNG = 14, + OVERVIEW = 15, + JSON = 16, + HTML = 17, + WEBP = 18, +} + +impl ::protobuf::ProtobufEnum for AssetType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(AssetType::UNKNOWN_ASSET), + 1 => ::std::option::Option::Some(AssetType::JPEG), + 2 => ::std::option::Option::Some(AssetType::GEOTIFF), + 3 => ::std::option::Option::Some(AssetType::LERC), + 4 => ::std::option::Option::Some(AssetType::MRF), + 5 => ::std::option::Option::Some(AssetType::MRF_IDX), + 6 => ::std::option::Option::Some(AssetType::MRF_XML), + 7 => ::std::option::Option::Some(AssetType::CO_GEOTIFF), + 8 => ::std::option::Option::Some(AssetType::RAW), + 9 => ::std::option::Option::Some(AssetType::THUMBNAIL), + 10 => ::std::option::Option::Some(AssetType::TIFF), + 11 => ::std::option::Option::Some(AssetType::JPEG_2000), + 12 => ::std::option::Option::Some(AssetType::XML), + 13 => ::std::option::Option::Some(AssetType::TXT), + 14 => ::std::option::Option::Some(AssetType::PNG), + 15 => ::std::option::Option::Some(AssetType::OVERVIEW), + 16 => ::std::option::Option::Some(AssetType::JSON), + 17 => ::std::option::Option::Some(AssetType::HTML), + 18 => ::std::option::Option::Some(AssetType::WEBP), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [AssetType] = &[ + AssetType::UNKNOWN_ASSET, + AssetType::JPEG, + AssetType::GEOTIFF, + AssetType::LERC, + AssetType::MRF, + AssetType::MRF_IDX, + AssetType::MRF_XML, + AssetType::CO_GEOTIFF, + AssetType::RAW, + AssetType::THUMBNAIL, + AssetType::TIFF, + AssetType::JPEG_2000, + AssetType::XML, + AssetType::TXT, + AssetType::PNG, + AssetType::OVERVIEW, + AssetType::JSON, + AssetType::HTML, + AssetType::WEBP, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("AssetType", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for AssetType { +} + +impl ::std::default::Default for AssetType { + fn default() -> Self { + AssetType::UNKNOWN_ASSET + } +} + +impl ::protobuf::reflect::ProtobufValue for AssetType { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] +pub enum CloudPlatform { + UNKNOWN_CLOUD_PLATFORM = 0, + AWS = 1, + GCP = 2, + AZURE = 3, +} + +impl ::protobuf::ProtobufEnum for CloudPlatform { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(CloudPlatform::UNKNOWN_CLOUD_PLATFORM), + 1 => ::std::option::Option::Some(CloudPlatform::AWS), + 2 => ::std::option::Option::Some(CloudPlatform::GCP), + 3 => ::std::option::Option::Some(CloudPlatform::AZURE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [CloudPlatform] = &[ + CloudPlatform::UNKNOWN_CLOUD_PLATFORM, + CloudPlatform::AWS, + CloudPlatform::GCP, + CloudPlatform::AZURE, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { + lock: ::protobuf::lazy::ONCE_INIT, + ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, + }; + unsafe { + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new("CloudPlatform", file_descriptor_proto()) + }) + } + } +} + +impl ::std::marker::Copy for CloudPlatform { +} + +impl ::std::default::Default for CloudPlatform { + fn default() -> Self { + CloudPlatform::UNKNOWN_CLOUD_PLATFORM + } +} + +impl ::protobuf::reflect::ProtobufValue for CloudPlatform { + fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { + ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x17epl/protobuf/stac.proto\x12\x0cepl.protobuf\x1a\x1fgoogle/protobuf\ + /timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/pro\ + tobuf/wrappers.proto\x1a\x19google/protobuf/any.proto\x1a\x1bepl/protobu\ + f/geometry.proto\x1a\x18epl/protobuf/query.proto\"\x95\x06\n\x08StacItem\ + \x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x126\n\x08geometry\x18\x03\ + \x20\x01(\x0b2\x1a.epl.protobuf.GeometryDataR\x08geometry\x12.\n\x04bbox\ + \x18\x04\x20\x01(\x0b2\x1a.epl.protobuf.EnvelopeDataR\x04bbox\x124\n\npr\ + operties\x18\x05\x20\x01(\x0b2\x14.google.protobuf.AnyR\nproperties\x12:\ + \n\x06assets\x18\x07\x20\x03(\x0b2\".epl.protobuf.StacItem.AssetsEntryR\ + \x06assets\x126\n\x08datetime\x18\x08\x20\x01(\x0b2\x1a.google.protobuf.\ + TimestampR\x08datetime\x12\x14\n\x05title\x18\t\x20\x01(\tR\x05title\x12\ + \x1e\n\ncollection\x18\n\x20\x01(\tR\ncollection\x126\n\x08observed\x18\ + \x0b\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x08observed\x125\n\x08\ + duration\x18\x12\x20\x01(\x0b2\x19.google.protobuf.DurationR\x08duration\ + \x128\n\tprocessed\x18\x0c\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\ + \tprocessed\x124\n\x07updated\x18\r\x20\x01(\x0b2\x1a.google.protobuf.Ti\ + mestampR\x07updated\x12\x20\n\x02eo\x18\x0e\x20\x01(\x0b2\x10.epl.protob\ + uf.EoR\x02eo\x12#\n\x03sar\x18\x0f\x20\x01(\x0b2\x11.epl.protobuf.SarR\ + \x03sar\x12/\n\x07landsat\x18\x11\x20\x01(\x0b2\x15.epl.protobuf.Landsat\ + R\x07landsat\x1aN\n\x0bAssetsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\ + \x03key\x12)\n\x05value\x18\x02\x20\x01(\x0b2\x13.epl.protobuf.AssetR\ + \x05value:\x028\x01J\x04\x08\x06\x10\x07J\x04\x08\x10\x10\x11\"\xd6\x05\ + \n\x0bStacRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x126\n\x08ge\ + ometry\x18\x02\x20\x01(\x0b2\x1a.epl.protobuf.GeometryDataR\x08geometry\ + \x12.\n\x04bbox\x18\x03\x20\x01(\x0b2\x1a.epl.protobuf.EnvelopeDataR\x04\ + bbox\x12H\n\x10geometry_request\x18\x04\x20\x01(\x0b2\x1d.epl.protobuf.G\ + eometryRequestR\x0fgeometryRequest\x124\n\nproperties\x18\x05\x20\x01(\ + \x0b2\x14.google.protobuf.AnyR\nproperties\x128\n\x08datetime\x18\x06\ + \x20\x01(\x0b2\x1c.epl.protobuf.TimestampFieldR\x08datetime\x128\n\x08ob\ + served\x18\x07\x20\x01(\x0b2\x1c.epl.protobuf.TimestampFieldR\x08observe\ + d\x12:\n\tprocessed\x18\x08\x20\x01(\x0b2\x1c.epl.protobuf.TimestampFiel\ + dR\tprocessed\x126\n\x07updated\x18\t\x20\x01(\x0b2\x1c.epl.protobuf.Tim\ + estampFieldR\x07updated\x12'\n\x02eo\x18\n\x20\x01(\x0b2\x17.epl.protobu\ + f.EoRequestR\x02eo\x12\x14\n\x05limit\x18\x0b\x20\x01(\rR\x05limit\x12\ + \x16\n\x06offset\x18\x0c\x20\x01(\x04R\x06offset\x126\n\x07landsat\x18\r\ + \x20\x01(\x0b2\x1c.epl.protobuf.LandsatRequestR\x07landsat\x12\x1e\n\nco\ + llection\x18\x0e\x20\x01(\tR\ncollection\x128\n\nid_complex\x18\x0f\x20\ + \x01(\x0b2\x19.epl.protobuf.StringFieldR\tidComplex\"\x89\x03\n\x05Asset\ + \x12\x12\n\x04href\x18\x01\x20\x01(\tR\x04href\x12\x12\n\x04type\x18\x02\ + \x20\x01(\tR\x04type\x120\n\x08eo_bands\x18\x03\x20\x01(\x0e2\x15.epl.pr\ + otobuf.Eo.BandR\x07eoBands\x126\n\nasset_type\x18\x04\x20\x01(\x0e2\x17.\ + epl.protobuf.AssetTypeR\tassetType\x12B\n\x0ecloud_platform\x18\x05\x20\ + \x01(\x0e2\x1b.epl.protobuf.CloudPlatformR\rcloudPlatform\x12%\n\x0ebuck\ + et_manager\x18\x06\x20\x01(\tR\rbucketManager\x12#\n\rbucket_region\x18\ + \x07\x20\x01(\tR\x0cbucketRegion\x12\x16\n\x06bucket\x18\x08\x20\x01(\tR\ + \x06bucket\x12\x1f\n\x0bobject_path\x18\t\x20\x01(\tR\nobjectPath\x12%\n\ + \x0erequester_pays\x18\n\x20\x01(\x08R\rrequesterPays\"o\n\rDatetimeRang\ + e\x120\n\x05start\x18\x01\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\ + \x05start\x12,\n\x03end\x18\x02\x20\x01(\x0b2\x1a.google.protobuf.Timest\ + ampR\x03end\"x\n\x0eStacDbResponse\x12\x16\n\x06status\x18\x01\x20\x01(\ + \tR\x06status\x12\x1f\n\x0bstatus_code\x18\x02\x20\x01(\x05R\nstatusCode\ + \x12\x17\n\x07data_id\x18\x03\x20\x01(\tR\x06dataId\x12\x14\n\x05count\ + \x18\x04\x20\x01(\x04R\x05count\"\xa3\x01\n\x03Sar\x126\n\x08platform\ + \x18\x01\x20\x01(\x0e2\x1a.epl.protobuf.Sar.PlatformR\x08platform\">\n\ + \x08Platform\x12\x14\n\x10UNKNOWN_PLATFORM\x10\0\x12\x0b\n\x07ENVISAT\ + \x10\x01\x12\x0f\n\x0bSENTINEL_1A\x10\x02\"$\n\nInstrument\x12\x16\n\x12\ + UNKNOWN_INSTRUMENT\x10\0\"\xc9\t\n\x02Eo\x12\x12\n\x04epsg\x18\x01\x20\ + \x01(\rR\x04epsg\x125\n\x08platform\x18\x02\x20\x01(\x0e2\x19.epl.protob\ + uf.Eo.PlatformR\x08platform\x12;\n\ninstrument\x18\x03\x20\x01(\x0e2\x1b\ + .epl.protobuf.Eo.InstrumentR\ninstrument\x12D\n\rconstellation\x18\x04\ + \x20\x01(\x0e2\x1e.epl.protobuf.Eo.ConstellationR\rconstellation\x12<\n\ + \x0bsun_azimuth\x18\x05\x20\x01(\x0b2\x1b.google.protobuf.FloatValueR\ns\ + unAzimuth\x12@\n\rsun_elevation\x18\x06\x20\x01(\x0b2\x1b.google.protobu\ + f.FloatValueR\x0csunElevation\x12-\n\x03gsd\x18\x07\x20\x01(\x0b2\x1b.go\ + ogle.protobuf.FloatValueR\x03gsd\x128\n\toff_nadir\x18\x08\x20\x01(\x0b2\ + \x1b.google.protobuf.FloatValueR\x08offNadir\x125\n\x07azimuth\x18\t\x20\ + \x01(\x0b2\x1b.google.protobuf.FloatValueR\x07azimuth\x12<\n\x0bcloud_co\ + ver\x18\n\x20\x01(\x0b2\x1b.google.protobuf.FloatValueR\ncloudCover\x12+\ + \n\x05bands\x18\x0b\x20\x01(\x0e2\x15.epl.protobuf.Eo.BandR\x05bands\x12\ + 2\n\x02sr\x18\x0c\x20\x01(\x0b2\".epl.protobuf.SpatialReferenceDataR\x02\ + sr\"\xb9\x01\n\x08Platform\x12\x14\n\x10UNKNOWN_PLATFORM\x10\0\x12\r\n\t\ + LANDSAT_1\x10\x02\x12\r\n\tLANDSAT_2\x10\x04\x12\r\n\tLANDSAT_3\x10\x08\ + \x12\x0f\n\x0bLANDSAT_123\x10\x0e\x12\r\n\tLANDSAT_4\x10\x10\x12\r\n\tLA\ + NDSAT_5\x10\x20\x12\x0e\n\nLANDSAT_45\x100\x12\r\n\tLANDSAT_7\x10@\x12\ + \x0e\n\tLANDSAT_8\x10\x80\x01\x12\x0c\n\x07SWIFT_2\x10\x80\x02\"j\n\nIns\ + trument\x12\x16\n\x12UNKNOWN_INSTRUMENT\x10\0\x12\x07\n\x03OLI\x10\x02\ + \x12\x08\n\x04TIRS\x10\x04\x12\x0c\n\x08OLI_TIRS\x10\x06\x12\t\n\x05POM_\ + 1\x10\x08\x12\x06\n\x02TM\x10\x10\x12\x07\n\x03ETM\x10\x20\x12\x07\n\x03\ + MSS\x10@\"V\n\rConstellation\x12\x19\n\x15UNKNOWN_CONSTELLATION\x10\0\ + \x12\x0b\n\x07LANDSAT\x10\x02\x12\x08\n\x04NAIP\x10\x04\x12\x08\n\x04PNO\ + A\x10\x08\x12\t\n\x05SWIFT\x10\x10\"\xb5\x01\n\x04Band\x12\x10\n\x0cUNKN\ + OWN_BAND\x10\0\x12\x0b\n\x07COASTAL\x10\x02\x12\x08\n\x04BLUE\x10\x04\ + \x12\t\n\x05GREEN\x10\x08\x12\x07\n\x03RED\x10\x10\x12\x07\n\x03RGB\x10\ + \x1c\x12\x07\n\x03NIR\x10\x20\x12\t\n\x05NIR_2\x10!\x12\t\n\x05RGBIR\x10\ + <\x12\n\n\x06SWIR_1\x10@\x12\x0b\n\x06SWIR_2\x10\x80\x01\x12\x08\n\x03PA\ + N\x10\x80\x02\x12\x0b\n\x06CIRRUS\x10\x80\x04\x12\x0b\n\x06LWIR_1\x10\ + \x80\x08\x12\x0b\n\x06LWIR_2\x10\x80\x10\"\xd2\x04\n\tEoRequest\x12\x12\ + \n\x04epsg\x18\x01\x20\x01(\x05R\x04epsg\x125\n\x08platform\x18\x02\x20\ + \x01(\x0e2\x19.epl.protobuf.Eo.PlatformR\x08platform\x12;\n\ninstrument\ + \x18\x03\x20\x01(\x0e2\x1b.epl.protobuf.Eo.InstrumentR\ninstrument\x12D\ + \n\rconstellation\x18\x04\x20\x01(\x0e2\x1e.epl.protobuf.Eo.Constellatio\ + nR\rconstellation\x129\n\x0bsun_azimuth\x18\x05\x20\x01(\x0b2\x18.epl.pr\ + otobuf.FloatFieldR\nsunAzimuth\x12=\n\rsun_elevation\x18\x06\x20\x01(\ + \x0b2\x18.epl.protobuf.FloatFieldR\x0csunElevation\x12*\n\x03gsd\x18\x07\ + \x20\x01(\x0b2\x18.epl.protobuf.FloatFieldR\x03gsd\x125\n\toff_nadir\x18\ + \x08\x20\x01(\x0b2\x18.epl.protobuf.FloatFieldR\x08offNadir\x122\n\x07az\ + imuth\x18\t\x20\x01(\x0b2\x18.epl.protobuf.FloatFieldR\x07azimuth\x129\n\ + \x0bcloud_cover\x18\n\x20\x01(\x0b2\x18.epl.protobuf.FloatFieldR\ncloudC\ + over\x12+\n\x05bands\x18\x0b\x20\x01(\x0e2\x15.epl.protobuf.Eo.BandR\x05\ + bands\"\xf1\x02\n\x07Landsat\x12\x19\n\x08scene_id\x18\x01\x20\x01(\tR\ + \x07sceneId\x12\x1d\n\nproduct_id\x18\x02\x20\x01(\tR\tproductId\x12P\n\ + \x10processing_level\x18\x03\x20\x01(\x0e2%.epl.protobuf.Landsat.Process\ + ingLevelR\x0fprocessingLevel\x12\x19\n\x08wrs_path\x18\x04\x20\x01(\x05R\ + \x07wrsPath\x12\x17\n\x07wrs_row\x18\x05\x20\x01(\x05R\x06wrsRow\x12E\n\ + \x10cloud_cover_land\x18\x06\x20\x01(\x0b2\x1b.google.protobuf.FloatValu\ + eR\x0ecloudCoverLand\"_\n\x0fProcessingLevel\x12\x1c\n\x18UNKNOWN_PROCES\ + SING_LEVEL\x10\0\x12\x07\n\x03L1G\x10\x01\x12\x08\n\x04L1TP\x10\x02\x12\ + \x07\n\x03L1T\x10\x03\x12\x08\n\x04L1GT\x10\x04\x12\x08\n\x04L1GS\x10\ + \x05\"\x94\x02\n\x0eLandsatRequest\x12\x19\n\x08scene_id\x18\x01\x20\x01\ + (\tR\x07sceneId\x12\x1d\n\nproduct_id\x18\x02\x20\x01(\tR\tproductId\x12\ + P\n\x10processing_level\x18\x03\x20\x01(\x0e2%.epl.protobuf.Landsat.Proc\ + essingLevelR\x0fprocessingLevel\x12\x19\n\x08wrs_path\x18\x04\x20\x01(\ + \x05R\x07wrsPath\x12\x17\n\x07wrs_row\x18\x05\x20\x01(\x05R\x06wrsRow\ + \x12B\n\x10cloud_cover_land\x18\x06\x20\x01(\x0b2\x18.epl.protobuf.Float\ + FieldR\x0ecloudCoverLand*\xea\x01\n\tAssetType\x12\x11\n\rUNKNOWN_ASSET\ + \x10\0\x12\x08\n\x04JPEG\x10\x01\x12\x0b\n\x07GEOTIFF\x10\x02\x12\x08\n\ + \x04LERC\x10\x03\x12\x07\n\x03MRF\x10\x04\x12\x0b\n\x07MRF_IDX\x10\x05\ + \x12\x0b\n\x07MRF_XML\x10\x06\x12\x0e\n\nCO_GEOTIFF\x10\x07\x12\x07\n\ + \x03RAW\x10\x08\x12\r\n\tTHUMBNAIL\x10\t\x12\x08\n\x04TIFF\x10\n\x12\r\n\ + \tJPEG_2000\x10\x0b\x12\x07\n\x03XML\x10\x0c\x12\x07\n\x03TXT\x10\r\x12\ + \x07\n\x03PNG\x10\x0e\x12\x0c\n\x08OVERVIEW\x10\x0f\x12\x08\n\x04JSON\ + \x10\x10\x12\x08\n\x04HTML\x10\x11\x12\x08\n\x04WEBP\x10\x12*H\n\rCloudP\ + latform\x12\x1a\n\x16UNKNOWN_CLOUD_PLATFORM\x10\0\x12\x07\n\x03AWS\x10\ + \x01\x12\x07\n\x03GCP\x10\x02\x12\t\n\x05AZURE\x10\x03BS\n\x10com.epl.pr\ + otobufB\tStacProtoP\x01Z+github.com/geo-grpc/api/golang/epl/protobuf\xa2\ + \x02\x04STPBb\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() + }) + } +} diff --git a/rust/src/proto/stac_service.rs b/rust/src/proto/stac_service.rs new file mode 100644 index 0000000..f2687cc --- /dev/null +++ b/rust/src/proto/stac_service.rs @@ -0,0 +1,61 @@ +// This file is generated by rust-protobuf 2.10.0. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] +//! Generated file from `epl/protobuf/stac_service.proto` + +use protobuf::Message as Message_imported_for_functions; +use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_0; + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x1fepl/protobuf/stac_service.proto\x12\x0cepl.protobuf\x1a\x17epl/pro\ + tobuf/stac.proto2\xaf\x04\n\x0bStacService\x12?\n\x06Search\x12\x19.epl.\ + protobuf.StacRequest\x1a\x16.epl.protobuf.StacItem\"\00\x01\x12D\n\x06In\ + sert\x12\x16.epl.protobuf.StacItem\x1a\x1c.epl.protobuf.StacDbResponse\"\ + \0(\x010\x01\x12D\n\x06Update\x12\x16.epl.protobuf.StacItem\x1a\x1c.epl.\ + protobuf.StacDbResponse\"\0(\x010\x01\x12B\n\x05Count\x12\x19.epl.protob\ + uf.StacRequest\x1a\x1c.epl.protobuf.StacDbResponse\"\0\x12C\n\tDeleteOne\ + \x12\x16.epl.protobuf.StacItem\x1a\x1c.epl.protobuf.StacDbResponse\"\0\ + \x12@\n\tSearchOne\x12\x19.epl.protobuf.StacRequest\x1a\x16.epl.protobuf\ + .StacItem\"\0\x12C\n\tInsertOne\x12\x16.epl.protobuf.StacItem\x1a\x1c.ep\ + l.protobuf.StacDbResponse\"\0\x12C\n\tUpdateOne\x12\x16.epl.protobuf.Sta\ + cItem\x1a\x1c.epl.protobuf.StacDbResponse\"\0BY\n\x10com.epl.protobufB\ + \x10StacServiceProtoP\x01Z+github.com/geo-grpc/api/golang/epl/protobuf\ + \xa2\x02\x03STSb\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() + }) + } +} diff --git a/rust/src/proto/stac_service_grpc.rs b/rust/src/proto/stac_service_grpc.rs new file mode 100644 index 0000000..448fdbd --- /dev/null +++ b/rust/src/proto/stac_service_grpc.rs @@ -0,0 +1,243 @@ +// This file is generated. Do not edit +// @generated + +// https://github.com/Manishearth/rust-clippy/issues/702 +#![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)] + +const METHOD_STAC_SERVICE_SEARCH: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::ServerStreaming, + name: "/epl.protobuf.StacService/Search", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_INSERT: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/epl.protobuf.StacService/Insert", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_UPDATE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Duplex, + name: "/epl.protobuf.StacService/Update", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_COUNT: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.StacService/Count", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_DELETE_ONE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.StacService/DeleteOne", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_SEARCH_ONE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.StacService/SearchOne", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_INSERT_ONE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.StacService/InsertOne", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +const METHOD_STAC_SERVICE_UPDATE_ONE: ::grpcio::Method = ::grpcio::Method { + ty: ::grpcio::MethodType::Unary, + name: "/epl.protobuf.StacService/UpdateOne", + req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, + resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, +}; + +#[derive(Clone)] +pub struct StacServiceClient { + client: ::grpcio::Client, +} + +impl StacServiceClient { + pub fn new(channel: ::grpcio::Channel) -> Self { + StacServiceClient { + client: ::grpcio::Client::new(channel), + } + } + + pub fn search_opt(&self, req: &super::stac::StacRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.client.server_streaming(&METHOD_STAC_SERVICE_SEARCH, req, opt) + } + + pub fn search(&self, req: &super::stac::StacRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver> { + self.search_opt(req, ::grpcio::CallOption::default()) + } + + pub fn insert_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.client.duplex_streaming(&METHOD_STAC_SERVICE_INSERT, opt) + } + + pub fn insert(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.insert_opt(::grpcio::CallOption::default()) + } + + pub fn update_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.client.duplex_streaming(&METHOD_STAC_SERVICE_UPDATE, opt) + } + + pub fn update(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender, ::grpcio::ClientDuplexReceiver)> { + self.update_opt(::grpcio::CallOption::default()) + } + + pub fn count_opt(&self, req: &super::stac::StacRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_STAC_SERVICE_COUNT, req, opt) + } + + pub fn count(&self, req: &super::stac::StacRequest) -> ::grpcio::Result { + self.count_opt(req, ::grpcio::CallOption::default()) + } + + pub fn count_async_opt(&self, req: &super::stac::StacRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_STAC_SERVICE_COUNT, req, opt) + } + + pub fn count_async(&self, req: &super::stac::StacRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.count_async_opt(req, ::grpcio::CallOption::default()) + } + + pub fn delete_one_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_STAC_SERVICE_DELETE_ONE, req, opt) + } + + pub fn delete_one(&self, req: &super::stac::StacItem) -> ::grpcio::Result { + self.delete_one_opt(req, ::grpcio::CallOption::default()) + } + + pub fn delete_one_async_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_STAC_SERVICE_DELETE_ONE, req, opt) + } + + pub fn delete_one_async(&self, req: &super::stac::StacItem) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.delete_one_async_opt(req, ::grpcio::CallOption::default()) + } + + pub fn search_one_opt(&self, req: &super::stac::StacRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_STAC_SERVICE_SEARCH_ONE, req, opt) + } + + pub fn search_one(&self, req: &super::stac::StacRequest) -> ::grpcio::Result { + self.search_one_opt(req, ::grpcio::CallOption::default()) + } + + pub fn search_one_async_opt(&self, req: &super::stac::StacRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_STAC_SERVICE_SEARCH_ONE, req, opt) + } + + pub fn search_one_async(&self, req: &super::stac::StacRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.search_one_async_opt(req, ::grpcio::CallOption::default()) + } + + pub fn insert_one_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_STAC_SERVICE_INSERT_ONE, req, opt) + } + + pub fn insert_one(&self, req: &super::stac::StacItem) -> ::grpcio::Result { + self.insert_one_opt(req, ::grpcio::CallOption::default()) + } + + pub fn insert_one_async_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_STAC_SERVICE_INSERT_ONE, req, opt) + } + + pub fn insert_one_async(&self, req: &super::stac::StacItem) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.insert_one_async_opt(req, ::grpcio::CallOption::default()) + } + + pub fn update_one_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result { + self.client.unary_call(&METHOD_STAC_SERVICE_UPDATE_ONE, req, opt) + } + + pub fn update_one(&self, req: &super::stac::StacItem) -> ::grpcio::Result { + self.update_one_opt(req, ::grpcio::CallOption::default()) + } + + pub fn update_one_async_opt(&self, req: &super::stac::StacItem, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.client.unary_call_async(&METHOD_STAC_SERVICE_UPDATE_ONE, req, opt) + } + + pub fn update_one_async(&self, req: &super::stac::StacItem) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { + self.update_one_async_opt(req, ::grpcio::CallOption::default()) + } + pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static { + self.client.spawn(f) + } +} + +pub trait StacService { + fn search(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacRequest, sink: ::grpcio::ServerStreamingSink); + fn insert(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn update(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream, sink: ::grpcio::DuplexSink); + fn count(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacRequest, sink: ::grpcio::UnarySink); + fn delete_one(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacItem, sink: ::grpcio::UnarySink); + fn search_one(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacRequest, sink: ::grpcio::UnarySink); + fn insert_one(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacItem, sink: ::grpcio::UnarySink); + fn update_one(&mut self, ctx: ::grpcio::RpcContext, req: super::stac::StacItem, sink: ::grpcio::UnarySink); +} + +pub fn create_stac_service(s: S) -> ::grpcio::Service { + let mut builder = ::grpcio::ServiceBuilder::new(); + let mut instance = s.clone(); + builder = builder.add_server_streaming_handler(&METHOD_STAC_SERVICE_SEARCH, move |ctx, req, resp| { + instance.search(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_duplex_streaming_handler(&METHOD_STAC_SERVICE_INSERT, move |ctx, req, resp| { + instance.insert(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_duplex_streaming_handler(&METHOD_STAC_SERVICE_UPDATE, move |ctx, req, resp| { + instance.update(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_STAC_SERVICE_COUNT, move |ctx, req, resp| { + instance.count(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_STAC_SERVICE_DELETE_ONE, move |ctx, req, resp| { + instance.delete_one(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_STAC_SERVICE_SEARCH_ONE, move |ctx, req, resp| { + instance.search_one(ctx, req, resp) + }); + let mut instance = s.clone(); + builder = builder.add_unary_handler(&METHOD_STAC_SERVICE_INSERT_ONE, move |ctx, req, resp| { + instance.insert_one(ctx, req, resp) + }); + let mut instance = s; + builder = builder.add_unary_handler(&METHOD_STAC_SERVICE_UPDATE_ONE, move |ctx, req, resp| { + instance.update_one(ctx, req, resp) + }); + builder.build() +} From 1e10d8cca9ee4348cd17ef19aa12db76d531cbff Mon Sep 17 00:00:00 2001 From: sunny-g Date: Mon, 6 Jan 2020 14:42:02 -0600 Subject: [PATCH 2/8] fix serde requirement --- Cargo.toml | 4 ++++ rust/Cargo.toml | 7 +++++-- rust/src/lib.rs | 2 -- rust/src/proto/geometry.rs | 2 ++ rust/src/proto/query.rs | 2 ++ rust/src/proto/stac.rs | 2 ++ 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 Cargo.toml diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..274b2bd --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = [ + "rust" +] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6c472d4..639fadc 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -10,10 +10,13 @@ build = "build.rs" futures = "0.1" grpcio = { version = "0.4", features = ["openssl"] } protobuf = { version = "2", features = ["with-serde"] } -serde = "1.0" -serde_derive = "1.0" +serde = { version = "1.0", features = ["derive"] } [build-dependencies] lazy_static = "1.4" protobuf-codegen = { version = "2" } protoc-grpcio = "1.1" + +[features] +default = ["with-serde"] +with-serde = ["protobuf/with-serde"] diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 7296dbc..9c1921b 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -1,7 +1,5 @@ mod proto; -pub(crate) use futures; - pub use proto::geometry::*; pub use proto::geometry_service::*; pub use proto::geometry_service_grpc::*; diff --git a/rust/src/proto/geometry.rs b/rust/src/proto/geometry.rs index be47559..817a8be 100644 --- a/rust/src/proto/geometry.rs +++ b/rust/src/proto/geometry.rs @@ -19,6 +19,8 @@ #![allow(unused_results)] //! Generated file from `epl/protobuf/geometry.proto` +// NOTE: THE FOLLOWING LINE WAS HAND-WRITTEN, DO NOT OMIT +use serde::{Deserialize, Serialize}; use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; diff --git a/rust/src/proto/query.rs b/rust/src/proto/query.rs index cfc12f3..f245dd9 100644 --- a/rust/src/proto/query.rs +++ b/rust/src/proto/query.rs @@ -19,6 +19,8 @@ #![allow(unused_results)] //! Generated file from `epl/protobuf/query.proto` +// NOTE: THE FOLLOWING LINE WAS HAND-WRITTEN, DO NOT OMIT +use serde::{Deserialize, Serialize}; use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; diff --git a/rust/src/proto/stac.rs b/rust/src/proto/stac.rs index a11fb76..d53a0f0 100644 --- a/rust/src/proto/stac.rs +++ b/rust/src/proto/stac.rs @@ -19,6 +19,8 @@ #![allow(unused_results)] //! Generated file from `epl/protobuf/stac.proto` +// NOTE: THE FOLLOWING LINE WAS HAND-WRITTEN, DO NOT OMIT +use serde::{Deserialize, Serialize}; use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; From e23594802af9812dee1e52e00534c8c351293bba Mon Sep 17 00:00:00 2001 From: sunny-g Date: Tue, 7 Jan 2020 17:05:04 -0600 Subject: [PATCH 3/8] fix build script --- .gitignore | 1 + rust/Cargo.toml | 4 ++++ rust/build.rs | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 485dee6..9358ed3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +target/ \ No newline at end of file diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 639fadc..51d4b11 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -6,6 +6,10 @@ edition = "2018" publish = false build = "build.rs" +[lib] +name = "stac_proto" +path = "src/lib.rs" + [dependencies] futures = "0.1" grpcio = { version = "0.4", features = ["openssl"] } diff --git a/rust/build.rs b/rust/build.rs index d08d9d4..b64b11b 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -1,6 +1,10 @@ extern crate protoc_grpcio; fn main() { + if !std::env::var("REBUILD").and(Ok(true)).unwrap_or_default() { + return; + } + let proto_lib_root = "src/proto"; let proto_root = "../proto"; let proto_files = [ From 9a361995163708c72c3c3438094c9a7621bd3f2b Mon Sep 17 00:00:00 2001 From: sunny-g Date: Wed, 8 Jan 2020 10:24:21 -0600 Subject: [PATCH 4/8] starting async tests --- rust/Cargo.toml | 4 ++++ rust/tests/mod.rs | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 rust/tests/mod.rs diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 51d4b11..488b339 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -16,6 +16,10 @@ grpcio = { version = "0.4", features = ["openssl"] } protobuf = { version = "2", features = ["with-serde"] } serde = { version = "1.0", features = ["derive"] } +[dev-dependencies] +futures03 = { package = "futures", version = "0.3", features = ["compat"] } +futures03-test = { package = "futures-test", version = "0.3" } + [build-dependencies] lazy_static = "1.4" protobuf-codegen = { version = "2" } diff --git a/rust/tests/mod.rs b/rust/tests/mod.rs new file mode 100644 index 0000000..aaf1194 --- /dev/null +++ b/rust/tests/mod.rs @@ -0,0 +1,39 @@ +#[cfg(test)] +mod tests { + use futures03::{compat::*, pin_mut, task::Poll, Stream}; + use futures03_test::{stream::StreamTestExt, task::noop_context}; + use grpcio::{ChannelBuilder, EnvBuilder, Error}; + use stac_proto::*; + + #[test] + fn it_works() -> Result<(), Error> { + let env = std::sync::Arc::new(EnvBuilder::new().build()); + let channel = ChannelBuilder::new(env).connect("https://eap.nearspacelabs.net"); + let client = StacServiceClient::new(channel); + + let res_stream = client + .search(&StacRequest::default())? + .compat() + .interleave_pending(); + + pin_mut!(res_stream); + let mut ctx = noop_context(); + + let first = res_stream.as_mut().poll_next(&mut ctx); + assert!(first.is_pending()); + + match res_stream.as_mut().poll_next(&mut ctx) { + Poll::Ready(Some(Ok(stac_item))) => { + println!("stac item: {:?}", stac_item); + assert!(true); + } + Poll::Ready(Some(Err(err))) => { + assert!(false, format!("result stream produced error: {}", err)); + } + Poll::Pending => assert!(false, "result stream still pending"), + _ => assert!(false, "result stream errored out"), + }; + Ok(()) + // println!("resulting stac item: {:?}", res.unwrap()); + } +} From 1cf9c0f1a3e224dc93b6d0ec1a3b628b8e9b38db Mon Sep 17 00:00:00 2001 From: sunny-g Date: Wed, 8 Jan 2020 17:35:12 -0600 Subject: [PATCH 5/8] adds basic test --- rust/Cargo.toml | 3 ++- rust/tests/mod.rs | 53 +++++++++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 488b339..10ef464 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -17,8 +17,9 @@ protobuf = { version = "2", features = ["with-serde"] } serde = { version = "1.0", features = ["derive"] } [dev-dependencies] -futures03 = { package = "futures", version = "0.3", features = ["compat"] } +futures03 = { package = "futures", version = "0.3", features = ["compat", "executor"] } futures03-test = { package = "futures-test", version = "0.3" } +lazy_static = "1.4" [build-dependencies] lazy_static = "1.4" diff --git a/rust/tests/mod.rs b/rust/tests/mod.rs index aaf1194..fed77bf 100644 --- a/rust/tests/mod.rs +++ b/rust/tests/mod.rs @@ -1,39 +1,46 @@ +#[macro_use] +extern crate lazy_static; + +lazy_static! { + pub static ref TOKEN: String = { + let token = + std::env::var("TOKEN").expect("Failed to retrieve environment variable `TOKEN`"); + format!("Bearer {}", token) + }; +} + #[cfg(test)] mod tests { - use futures03::{compat::*, pin_mut, task::Poll, Stream}; + use super::TOKEN; + use futures03::{compat::Stream01CompatExt, executor, pin_mut, task::Poll, Stream, StreamExt}; use futures03_test::{stream::StreamTestExt, task::noop_context}; - use grpcio::{ChannelBuilder, EnvBuilder, Error}; + use grpcio::{CallOption, ChannelBuilder, EnvBuilder, Error, MetadataBuilder}; use stac_proto::*; #[test] fn it_works() -> Result<(), Error> { + // setup let env = std::sync::Arc::new(EnvBuilder::new().build()); - let channel = ChannelBuilder::new(env).connect("https://eap.nearspacelabs.net"); + let channel = ChannelBuilder::new(env).connect("api.nearspacelabs.net:9090"); let client = StacServiceClient::new(channel); - let res_stream = client - .search(&StacRequest::default())? - .compat() - .interleave_pending(); + // headers + let mut metadata_builder = MetadataBuilder::new(); + metadata_builder + .add_str("Authorization", TOKEN.as_str()) + .unwrap_or_else(|_| panic!("unable to set token as an `Authorization` header")); + let opts = CallOption::default().headers(metadata_builder.build()); - pin_mut!(res_stream); - let mut ctx = noop_context(); + // result stream into vec + let res_stream = client.search_opt(&StacRequest::default(), opts)?.compat(); + let mut vec = executor::block_on(res_stream.collect::>>()); - let first = res_stream.as_mut().poll_next(&mut ctx); - assert!(first.is_pending()); + assert!(!vec.is_empty(), "Failed to retrieve any stac items"); + for (count, item) in vec.into_iter().enumerate() { + assert!(item.is_ok(), format!("Erroneous result: {:?}", item)); + println!("stac item ID: {:?}", item.unwrap().get_id()); + } - match res_stream.as_mut().poll_next(&mut ctx) { - Poll::Ready(Some(Ok(stac_item))) => { - println!("stac item: {:?}", stac_item); - assert!(true); - } - Poll::Ready(Some(Err(err))) => { - assert!(false, format!("result stream produced error: {}", err)); - } - Poll::Pending => assert!(false, "result stream still pending"), - _ => assert!(false, "result stream errored out"), - }; Ok(()) - // println!("resulting stac item: {:?}", res.unwrap()); } } From 4ad1cc05f2fe0fbcd174301ca47c36b6e896a801 Mon Sep 17 00:00:00 2001 From: sunny-g Date: Thu, 9 Jan 2020 10:39:03 -0600 Subject: [PATCH 6/8] cleanup build script --- rust/build.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/build.rs b/rust/build.rs index b64b11b..f929799 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -1,7 +1,7 @@ extern crate protoc_grpcio; fn main() { - if !std::env::var("REBUILD").and(Ok(true)).unwrap_or_default() { + if std::env::var("REBUILD").is_err() { return; } @@ -26,4 +26,11 @@ fn main() { }), ) .expect("Failed to compile gRPC definitions!"); + + println!( + "gRPC definitions successfully created!\ + Be sure to add a `use serde::{{Serialize, Deserialize}};` line to the \ + non-service modules.\ + " + ) } From 55fc634162b23cd9bdfcc7c2c93df5edccec1a0c Mon Sep 17 00:00:00 2001 From: sunny-g Date: Thu, 9 Jan 2020 10:43:06 -0600 Subject: [PATCH 7/8] cleanup test --- rust/tests/mod.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/rust/tests/mod.rs b/rust/tests/mod.rs index fed77bf..e7f2622 100644 --- a/rust/tests/mod.rs +++ b/rust/tests/mod.rs @@ -12,8 +12,7 @@ lazy_static! { #[cfg(test)] mod tests { use super::TOKEN; - use futures03::{compat::Stream01CompatExt, executor, pin_mut, task::Poll, Stream, StreamExt}; - use futures03_test::{stream::StreamTestExt, task::noop_context}; + use futures03::{compat::Stream01CompatExt, executor, StreamExt}; use grpcio::{CallOption, ChannelBuilder, EnvBuilder, Error, MetadataBuilder}; use stac_proto::*; @@ -29,14 +28,17 @@ mod tests { metadata_builder .add_str("Authorization", TOKEN.as_str()) .unwrap_or_else(|_| panic!("unable to set token as an `Authorization` header")); - let opts = CallOption::default().headers(metadata_builder.build()); + let metadata = metadata_builder.build(); + let opts = CallOption::default().headers(metadata); - // result stream into vec - let res_stream = client.search_opt(&StacRequest::default(), opts)?.compat(); - let mut vec = executor::block_on(res_stream.collect::>>()); + let req = &StacRequest::default(); + + // collect result stream into vec + let res = client.search_opt(&req, opts)?.compat(); + let vec = executor::block_on(res.collect::>>()); assert!(!vec.is_empty(), "Failed to retrieve any stac items"); - for (count, item) in vec.into_iter().enumerate() { + for item in vec.into_iter() { assert!(item.is_ok(), format!("Erroneous result: {:?}", item)); println!("stac item ID: {:?}", item.unwrap().get_id()); } From 7561f02f9ce16e2a10016ee999ea7a6faf5749f2 Mon Sep 17 00:00:00 2001 From: sunny-g Date: Thu, 9 Jan 2020 14:36:21 -0600 Subject: [PATCH 8/8] adds readme --- rust/README.md | 15 +++++++++++++++ rust/src/lib.rs | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 rust/README.md diff --git a/rust/README.md b/rust/README.md new file mode 100644 index 0000000..b89567d --- /dev/null +++ b/rust/README.md @@ -0,0 +1,15 @@ +# stac-proto + +## Install + +```bash +$ cargo build + +# to rebuild proto modules +REBUILD=true cargo build +# then in the `geometry`, `query` and `stac` modules, +# add the line `use serde::{Deserialize, Serialize};` to the other imports. +``` + +See `tests/mod.rs` for a full example using the client, though this will + require a valid authentication token. diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 9c1921b..f00af8f 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -1,3 +1,5 @@ +//! stac-proto + mod proto; pub use proto::geometry::*;