// This file is generated by rust-protobuf 2.18.1. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![rustfmt::skip]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `tree_file_format.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_18_1;

#[derive(PartialEq,Clone,Default)]
pub struct NodeProto {
    // message fields
    pub coverage_count: u64,
    pub center_index: u64,
    pub scale_index: i32,
    pub parent_center_index: u64,
    pub parent_scale_index: i32,
    pub is_leaf: bool,
    pub children_point_indexes: ::std::vec::Vec<u64>,
    pub children_scale_indexes: ::std::vec::Vec<i32>,
    pub nested_scale_index: i32,
    pub outlier_point_indexes: ::std::vec::Vec<u64>,
    pub outlier_summary_json: ::std::string::String,
    pub radius: f32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a NodeProto {
    fn default() -> &'a NodeProto {
        <NodeProto as ::protobuf::Message>::default_instance()
    }
}

impl NodeProto {
    pub fn new() -> NodeProto {
        ::std::default::Default::default()
    }

    // uint64 coverage_count = 1;


    pub fn get_coverage_count(&self) -> u64 {
        self.coverage_count
    }
    pub fn clear_coverage_count(&mut self) {
        self.coverage_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_coverage_count(&mut self, v: u64) {
        self.coverage_count = v;
    }

    // uint64 center_index = 2;


    pub fn get_center_index(&self) -> u64 {
        self.center_index
    }
    pub fn clear_center_index(&mut self) {
        self.center_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_center_index(&mut self, v: u64) {
        self.center_index = v;
    }

    // int32 scale_index = 3;


    pub fn get_scale_index(&self) -> i32 {
        self.scale_index
    }
    pub fn clear_scale_index(&mut self) {
        self.scale_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_scale_index(&mut self, v: i32) {
        self.scale_index = v;
    }

    // uint64 parent_center_index = 4;


    pub fn get_parent_center_index(&self) -> u64 {
        self.parent_center_index
    }
    pub fn clear_parent_center_index(&mut self) {
        self.parent_center_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_parent_center_index(&mut self, v: u64) {
        self.parent_center_index = v;
    }

    // int32 parent_scale_index = 5;


    pub fn get_parent_scale_index(&self) -> i32 {
        self.parent_scale_index
    }
    pub fn clear_parent_scale_index(&mut self) {
        self.parent_scale_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_parent_scale_index(&mut self, v: i32) {
        self.parent_scale_index = v;
    }

    // bool is_leaf = 6;


    pub fn get_is_leaf(&self) -> bool {
        self.is_leaf
    }
    pub fn clear_is_leaf(&mut self) {
        self.is_leaf = false;
    }

    // Param is passed by value, moved
    pub fn set_is_leaf(&mut self, v: bool) {
        self.is_leaf = v;
    }

    // repeated uint64 children_point_indexes = 7;


    pub fn get_children_point_indexes(&self) -> &[u64] {
        &self.children_point_indexes
    }
    pub fn clear_children_point_indexes(&mut self) {
        self.children_point_indexes.clear();
    }

    // Param is passed by value, moved
    pub fn set_children_point_indexes(&mut self, v: ::std::vec::Vec<u64>) {
        self.children_point_indexes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_children_point_indexes(&mut self) -> &mut ::std::vec::Vec<u64> {
        &mut self.children_point_indexes
    }

    // Take field
    pub fn take_children_point_indexes(&mut self) -> ::std::vec::Vec<u64> {
        ::std::mem::replace(&mut self.children_point_indexes, ::std::vec::Vec::new())
    }

    // repeated int32 children_scale_indexes = 8;


    pub fn get_children_scale_indexes(&self) -> &[i32] {
        &self.children_scale_indexes
    }
    pub fn clear_children_scale_indexes(&mut self) {
        self.children_scale_indexes.clear();
    }

    // Param is passed by value, moved
    pub fn set_children_scale_indexes(&mut self, v: ::std::vec::Vec<i32>) {
        self.children_scale_indexes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_children_scale_indexes(&mut self) -> &mut ::std::vec::Vec<i32> {
        &mut self.children_scale_indexes
    }

    // Take field
    pub fn take_children_scale_indexes(&mut self) -> ::std::vec::Vec<i32> {
        ::std::mem::replace(&mut self.children_scale_indexes, ::std::vec::Vec::new())
    }

    // int32 nested_scale_index = 9;


    pub fn get_nested_scale_index(&self) -> i32 {
        self.nested_scale_index
    }
    pub fn clear_nested_scale_index(&mut self) {
        self.nested_scale_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_nested_scale_index(&mut self, v: i32) {
        self.nested_scale_index = v;
    }

    // repeated uint64 outlier_point_indexes = 10;


    pub fn get_outlier_point_indexes(&self) -> &[u64] {
        &self.outlier_point_indexes
    }
    pub fn clear_outlier_point_indexes(&mut self) {
        self.outlier_point_indexes.clear();
    }

    // Param is passed by value, moved
    pub fn set_outlier_point_indexes(&mut self, v: ::std::vec::Vec<u64>) {
        self.outlier_point_indexes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_outlier_point_indexes(&mut self) -> &mut ::std::vec::Vec<u64> {
        &mut self.outlier_point_indexes
    }

    // Take field
    pub fn take_outlier_point_indexes(&mut self) -> ::std::vec::Vec<u64> {
        ::std::mem::replace(&mut self.outlier_point_indexes, ::std::vec::Vec::new())
    }

    // string outlier_summary_json = 11;


    pub fn get_outlier_summary_json(&self) -> &str {
        &self.outlier_summary_json
    }
    pub fn clear_outlier_summary_json(&mut self) {
        self.outlier_summary_json.clear();
    }

    // Param is passed by value, moved
    pub fn set_outlier_summary_json(&mut self, v: ::std::string::String) {
        self.outlier_summary_json = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_outlier_summary_json(&mut self) -> &mut ::std::string::String {
        &mut self.outlier_summary_json
    }

    // Take field
    pub fn take_outlier_summary_json(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.outlier_summary_json, ::std::string::String::new())
    }

    // float radius = 12;


    pub fn get_radius(&self) -> f32 {
        self.radius
    }
    pub fn clear_radius(&mut self) {
        self.radius = 0.;
    }

    // Param is passed by value, moved
    pub fn set_radius(&mut self, v: f32) {
        self.radius = v;
    }
}

impl ::protobuf::Message for NodeProto {
    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_uint64()?;
                    self.coverage_count = 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_uint64()?;
                    self.center_index = 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.scale_index = 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_uint64()?;
                    self.parent_center_index = 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.parent_scale_index = tmp;
                },
                6 => {
                    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_leaf = tmp;
                },
                7 => {
                    ::protobuf::rt::read_repeated_uint64_into(wire_type, is, &mut self.children_point_indexes)?;
                },
                8 => {
                    ::protobuf::rt::read_repeated_int32_into(wire_type, is, &mut self.children_scale_indexes)?;
                },
                9 => {
                    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.nested_scale_index = tmp;
                },
                10 => {
                    ::protobuf::rt::read_repeated_uint64_into(wire_type, is, &mut self.outlier_point_indexes)?;
                },
                11 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.outlier_summary_json)?;
                },
                12 => {
                    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.radius = 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.coverage_count != 0 {
            my_size += ::protobuf::rt::value_size(1, self.coverage_count, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.center_index != 0 {
            my_size += ::protobuf::rt::value_size(2, self.center_index, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.scale_index != 0 {
            my_size += ::protobuf::rt::value_size(3, self.scale_index, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.parent_center_index != 0 {
            my_size += ::protobuf::rt::value_size(4, self.parent_center_index, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.parent_scale_index != 0 {
            my_size += ::protobuf::rt::value_size(5, self.parent_scale_index, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.is_leaf != false {
            my_size += 2;
        }
        for value in &self.children_point_indexes {
            my_size += ::protobuf::rt::value_size(7, *value, ::protobuf::wire_format::WireTypeVarint);
        };
        for value in &self.children_scale_indexes {
            my_size += ::protobuf::rt::value_size(8, *value, ::protobuf::wire_format::WireTypeVarint);
        };
        if self.nested_scale_index != 0 {
            my_size += ::protobuf::rt::value_size(9, self.nested_scale_index, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.outlier_point_indexes {
            my_size += ::protobuf::rt::value_size(10, *value, ::protobuf::wire_format::WireTypeVarint);
        };
        if !self.outlier_summary_json.is_empty() {
            my_size += ::protobuf::rt::string_size(11, &self.outlier_summary_json);
        }
        if self.radius != 0. {
            my_size += 5;
        }
        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.coverage_count != 0 {
            os.write_uint64(1, self.coverage_count)?;
        }
        if self.center_index != 0 {
            os.write_uint64(2, self.center_index)?;
        }
        if self.scale_index != 0 {
            os.write_int32(3, self.scale_index)?;
        }
        if self.parent_center_index != 0 {
            os.write_uint64(4, self.parent_center_index)?;
        }
        if self.parent_scale_index != 0 {
            os.write_int32(5, self.parent_scale_index)?;
        }
        if self.is_leaf != false {
            os.write_bool(6, self.is_leaf)?;
        }
        for v in &self.children_point_indexes {
            os.write_uint64(7, *v)?;
        };
        for v in &self.children_scale_indexes {
            os.write_int32(8, *v)?;
        };
        if self.nested_scale_index != 0 {
            os.write_int32(9, self.nested_scale_index)?;
        }
        for v in &self.outlier_point_indexes {
            os.write_uint64(10, *v)?;
        };
        if !self.outlier_summary_json.is_empty() {
            os.write_string(11, &self.outlier_summary_json)?;
        }
        if self.radius != 0. {
            os.write_float(12, self.radius)?;
        }
        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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> NodeProto {
        NodeProto::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "coverage_count",
                |m: &NodeProto| { &m.coverage_count },
                |m: &mut NodeProto| { &mut m.coverage_count },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "center_index",
                |m: &NodeProto| { &m.center_index },
                |m: &mut NodeProto| { &mut m.center_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "scale_index",
                |m: &NodeProto| { &m.scale_index },
                |m: &mut NodeProto| { &mut m.scale_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "parent_center_index",
                |m: &NodeProto| { &m.parent_center_index },
                |m: &mut NodeProto| { &mut m.parent_center_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "parent_scale_index",
                |m: &NodeProto| { &m.parent_scale_index },
                |m: &mut NodeProto| { &mut m.parent_scale_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "is_leaf",
                |m: &NodeProto| { &m.is_leaf },
                |m: &mut NodeProto| { &mut m.is_leaf },
            ));
            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "children_point_indexes",
                |m: &NodeProto| { &m.children_point_indexes },
                |m: &mut NodeProto| { &mut m.children_point_indexes },
            ));
            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "children_scale_indexes",
                |m: &NodeProto| { &m.children_scale_indexes },
                |m: &mut NodeProto| { &mut m.children_scale_indexes },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "nested_scale_index",
                |m: &NodeProto| { &m.nested_scale_index },
                |m: &mut NodeProto| { &mut m.nested_scale_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "outlier_point_indexes",
                |m: &NodeProto| { &m.outlier_point_indexes },
                |m: &mut NodeProto| { &mut m.outlier_point_indexes },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "outlier_summary_json",
                |m: &NodeProto| { &m.outlier_summary_json },
                |m: &mut NodeProto| { &mut m.outlier_summary_json },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "radius",
                |m: &NodeProto| { &m.radius },
                |m: &mut NodeProto| { &mut m.radius },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<NodeProto>(
                "NodeProto",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static NodeProto {
        static instance: ::protobuf::rt::LazyV2<NodeProto> = ::protobuf::rt::LazyV2::INIT;
        instance.get(NodeProto::new)
    }
}

impl ::protobuf::Clear for NodeProto {
    fn clear(&mut self) {
        self.coverage_count = 0;
        self.center_index = 0;
        self.scale_index = 0;
        self.parent_center_index = 0;
        self.parent_scale_index = 0;
        self.is_leaf = false;
        self.children_point_indexes.clear();
        self.children_scale_indexes.clear();
        self.nested_scale_index = 0;
        self.outlier_point_indexes.clear();
        self.outlier_summary_json.clear();
        self.radius = 0.;
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for NodeProto {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for NodeProto {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct LayerProto {
    // message fields
    pub scale_index: i32,
    pub nodes: ::protobuf::RepeatedField<NodeProto>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a LayerProto {
    fn default() -> &'a LayerProto {
        <LayerProto as ::protobuf::Message>::default_instance()
    }
}

impl LayerProto {
    pub fn new() -> LayerProto {
        ::std::default::Default::default()
    }

    // int32 scale_index = 1;


    pub fn get_scale_index(&self) -> i32 {
        self.scale_index
    }
    pub fn clear_scale_index(&mut self) {
        self.scale_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_scale_index(&mut self, v: i32) {
        self.scale_index = v;
    }

    // repeated .CoverTree.NodeProto nodes = 2;


    pub fn get_nodes(&self) -> &[NodeProto] {
        &self.nodes
    }
    pub fn clear_nodes(&mut self) {
        self.nodes.clear();
    }

    // Param is passed by value, moved
    pub fn set_nodes(&mut self, v: ::protobuf::RepeatedField<NodeProto>) {
        self.nodes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_nodes(&mut self) -> &mut ::protobuf::RepeatedField<NodeProto> {
        &mut self.nodes
    }

    // Take field
    pub fn take_nodes(&mut self) -> ::protobuf::RepeatedField<NodeProto> {
        ::std::mem::replace(&mut self.nodes, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for LayerProto {
    fn is_initialized(&self) -> bool {
        for v in &self.nodes {
            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.scale_index = tmp;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.nodes)?;
                },
                _ => {
                    ::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.scale_index != 0 {
            my_size += ::protobuf::rt::value_size(1, self.scale_index, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.nodes {
            let len = value.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.scale_index != 0 {
            os.write_int32(1, self.scale_index)?;
        }
        for v in &self.nodes {
            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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> LayerProto {
        LayerProto::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "scale_index",
                |m: &LayerProto| { &m.scale_index },
                |m: &mut LayerProto| { &mut m.scale_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<NodeProto>>(
                "nodes",
                |m: &LayerProto| { &m.nodes },
                |m: &mut LayerProto| { &mut m.nodes },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<LayerProto>(
                "LayerProto",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static LayerProto {
        static instance: ::protobuf::rt::LazyV2<LayerProto> = ::protobuf::rt::LazyV2::INIT;
        instance.get(LayerProto::new)
    }
}

impl ::protobuf::Clear for LayerProto {
    fn clear(&mut self) {
        self.scale_index = 0;
        self.nodes.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for LayerProto {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for LayerProto {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct CoreProto {
    // message fields
    pub use_singletons: bool,
    pub scale_base: f32,
    pub cutoff: u64,
    pub resolution: i32,
    pub partition_type: ::std::string::String,
    pub dim: u64,
    pub count: u64,
    pub root_scale: i32,
    pub root_index: u64,
    pub layers: ::protobuf::RepeatedField<LayerProto>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a CoreProto {
    fn default() -> &'a CoreProto {
        <CoreProto as ::protobuf::Message>::default_instance()
    }
}

impl CoreProto {
    pub fn new() -> CoreProto {
        ::std::default::Default::default()
    }

    // bool use_singletons = 1;


    pub fn get_use_singletons(&self) -> bool {
        self.use_singletons
    }
    pub fn clear_use_singletons(&mut self) {
        self.use_singletons = false;
    }

    // Param is passed by value, moved
    pub fn set_use_singletons(&mut self, v: bool) {
        self.use_singletons = v;
    }

    // float scale_base = 2;


    pub fn get_scale_base(&self) -> f32 {
        self.scale_base
    }
    pub fn clear_scale_base(&mut self) {
        self.scale_base = 0.;
    }

    // Param is passed by value, moved
    pub fn set_scale_base(&mut self, v: f32) {
        self.scale_base = v;
    }

    // uint64 cutoff = 3;


    pub fn get_cutoff(&self) -> u64 {
        self.cutoff
    }
    pub fn clear_cutoff(&mut self) {
        self.cutoff = 0;
    }

    // Param is passed by value, moved
    pub fn set_cutoff(&mut self, v: u64) {
        self.cutoff = v;
    }

    // sint32 resolution = 4;


    pub fn get_resolution(&self) -> i32 {
        self.resolution
    }
    pub fn clear_resolution(&mut self) {
        self.resolution = 0;
    }

    // Param is passed by value, moved
    pub fn set_resolution(&mut self, v: i32) {
        self.resolution = v;
    }

    // string partition_type = 5;


    pub fn get_partition_type(&self) -> &str {
        &self.partition_type
    }
    pub fn clear_partition_type(&mut self) {
        self.partition_type.clear();
    }

    // Param is passed by value, moved
    pub fn set_partition_type(&mut self, v: ::std::string::String) {
        self.partition_type = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_partition_type(&mut self) -> &mut ::std::string::String {
        &mut self.partition_type
    }

    // Take field
    pub fn take_partition_type(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.partition_type, ::std::string::String::new())
    }

    // uint64 dim = 7;


    pub fn get_dim(&self) -> u64 {
        self.dim
    }
    pub fn clear_dim(&mut self) {
        self.dim = 0;
    }

    // Param is passed by value, moved
    pub fn set_dim(&mut self, v: u64) {
        self.dim = v;
    }

    // uint64 count = 8;


    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;
    }

    // int32 root_scale = 9;


    pub fn get_root_scale(&self) -> i32 {
        self.root_scale
    }
    pub fn clear_root_scale(&mut self) {
        self.root_scale = 0;
    }

    // Param is passed by value, moved
    pub fn set_root_scale(&mut self, v: i32) {
        self.root_scale = v;
    }

    // uint64 root_index = 10;


    pub fn get_root_index(&self) -> u64 {
        self.root_index
    }
    pub fn clear_root_index(&mut self) {
        self.root_index = 0;
    }

    // Param is passed by value, moved
    pub fn set_root_index(&mut self, v: u64) {
        self.root_index = v;
    }

    // repeated .CoverTree.LayerProto layers = 11;


    pub fn get_layers(&self) -> &[LayerProto] {
        &self.layers
    }
    pub fn clear_layers(&mut self) {
        self.layers.clear();
    }

    // Param is passed by value, moved
    pub fn set_layers(&mut self, v: ::protobuf::RepeatedField<LayerProto>) {
        self.layers = v;
    }

    // Mutable pointer to the field.
    pub fn mut_layers(&mut self) -> &mut ::protobuf::RepeatedField<LayerProto> {
        &mut self.layers
    }

    // Take field
    pub fn take_layers(&mut self) -> ::protobuf::RepeatedField<LayerProto> {
        ::std::mem::replace(&mut self.layers, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for CoreProto {
    fn is_initialized(&self) -> bool {
        for v in &self.layers {
            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_bool()?;
                    self.use_singletons = tmp;
                },
                2 => {
                    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.scale_base = 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_uint64()?;
                    self.cutoff = 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_sint32()?;
                    self.resolution = tmp;
                },
                5 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.partition_type)?;
                },
                7 => {
                    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.dim = 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_uint64()?;
                    self.count = tmp;
                },
                9 => {
                    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.root_scale = tmp;
                },
                10 => {
                    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.root_index = tmp;
                },
                11 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.layers)?;
                },
                _ => {
                    ::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.use_singletons != false {
            my_size += 2;
        }
        if self.scale_base != 0. {
            my_size += 5;
        }
        if self.cutoff != 0 {
            my_size += ::protobuf::rt::value_size(3, self.cutoff, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.resolution != 0 {
            my_size += ::protobuf::rt::value_varint_zigzag_size(4, self.resolution);
        }
        if !self.partition_type.is_empty() {
            my_size += ::protobuf::rt::string_size(5, &self.partition_type);
        }
        if self.dim != 0 {
            my_size += ::protobuf::rt::value_size(7, self.dim, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.count != 0 {
            my_size += ::protobuf::rt::value_size(8, self.count, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.root_scale != 0 {
            my_size += ::protobuf::rt::value_size(9, self.root_scale, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.root_index != 0 {
            my_size += ::protobuf::rt::value_size(10, self.root_index, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.layers {
            let len = value.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.use_singletons != false {
            os.write_bool(1, self.use_singletons)?;
        }
        if self.scale_base != 0. {
            os.write_float(2, self.scale_base)?;
        }
        if self.cutoff != 0 {
            os.write_uint64(3, self.cutoff)?;
        }
        if self.resolution != 0 {
            os.write_sint32(4, self.resolution)?;
        }
        if !self.partition_type.is_empty() {
            os.write_string(5, &self.partition_type)?;
        }
        if self.dim != 0 {
            os.write_uint64(7, self.dim)?;
        }
        if self.count != 0 {
            os.write_uint64(8, self.count)?;
        }
        if self.root_scale != 0 {
            os.write_int32(9, self.root_scale)?;
        }
        if self.root_index != 0 {
            os.write_uint64(10, self.root_index)?;
        }
        for v in &self.layers {
            os.write_tag(11, ::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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> CoreProto {
        CoreProto::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "use_singletons",
                |m: &CoreProto| { &m.use_singletons },
                |m: &mut CoreProto| { &mut m.use_singletons },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "scale_base",
                |m: &CoreProto| { &m.scale_base },
                |m: &mut CoreProto| { &mut m.scale_base },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "cutoff",
                |m: &CoreProto| { &m.cutoff },
                |m: &mut CoreProto| { &mut m.cutoff },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeSint32>(
                "resolution",
                |m: &CoreProto| { &m.resolution },
                |m: &mut CoreProto| { &mut m.resolution },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "partition_type",
                |m: &CoreProto| { &m.partition_type },
                |m: &mut CoreProto| { &mut m.partition_type },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "dim",
                |m: &CoreProto| { &m.dim },
                |m: &mut CoreProto| { &mut m.dim },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "count",
                |m: &CoreProto| { &m.count },
                |m: &mut CoreProto| { &mut m.count },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "root_scale",
                |m: &CoreProto| { &m.root_scale },
                |m: &mut CoreProto| { &mut m.root_scale },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                "root_index",
                |m: &CoreProto| { &m.root_index },
                |m: &mut CoreProto| { &mut m.root_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LayerProto>>(
                "layers",
                |m: &CoreProto| { &m.layers },
                |m: &mut CoreProto| { &mut m.layers },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<CoreProto>(
                "CoreProto",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static CoreProto {
        static instance: ::protobuf::rt::LazyV2<CoreProto> = ::protobuf::rt::LazyV2::INIT;
        instance.get(CoreProto::new)
    }
}

impl ::protobuf::Clear for CoreProto {
    fn clear(&mut self) {
        self.use_singletons = false;
        self.scale_base = 0.;
        self.cutoff = 0;
        self.resolution = 0;
        self.partition_type.clear();
        self.dim = 0;
        self.count = 0;
        self.root_scale = 0;
        self.root_index = 0;
        self.layers.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for CoreProto {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for CoreProto {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x16tree_file_format.proto\x12\tCoverTree\"\x85\x04\n\tNodeProto\x12%\
    \n\x0ecoverage_count\x18\x01\x20\x01(\x04R\rcoverageCount\x12!\n\x0ccent\
    er_index\x18\x02\x20\x01(\x04R\x0bcenterIndex\x12\x1f\n\x0bscale_index\
    \x18\x03\x20\x01(\x05R\nscaleIndex\x12.\n\x13parent_center_index\x18\x04\
    \x20\x01(\x04R\x11parentCenterIndex\x12,\n\x12parent_scale_index\x18\x05\
    \x20\x01(\x05R\x10parentScaleIndex\x12\x17\n\x07is_leaf\x18\x06\x20\x01(\
    \x08R\x06isLeaf\x124\n\x16children_point_indexes\x18\x07\x20\x03(\x04R\
    \x14childrenPointIndexes\x124\n\x16children_scale_indexes\x18\x08\x20\
    \x03(\x05R\x14childrenScaleIndexes\x12,\n\x12nested_scale_index\x18\t\
    \x20\x01(\x05R\x10nestedScaleIndex\x122\n\x15outlier_point_indexes\x18\n\
    \x20\x03(\x04R\x13outlierPointIndexes\x120\n\x14outlier_summary_json\x18\
    \x0b\x20\x01(\tR\x12outlierSummaryJson\x12\x16\n\x06radius\x18\x0c\x20\
    \x01(\x02R\x06radius\"Y\n\nLayerProto\x12\x1f\n\x0bscale_index\x18\x01\
    \x20\x01(\x05R\nscaleIndex\x12*\n\x05nodes\x18\x02\x20\x03(\x0b2\x14.Cov\
    erTree.NodeProtoR\x05nodes\"\xc5\x02\n\tCoreProto\x12%\n\x0euse_singleto\
    ns\x18\x01\x20\x01(\x08R\ruseSingletons\x12\x1d\n\nscale_base\x18\x02\
    \x20\x01(\x02R\tscaleBase\x12\x16\n\x06cutoff\x18\x03\x20\x01(\x04R\x06c\
    utoff\x12\x1e\n\nresolution\x18\x04\x20\x01(\x11R\nresolution\x12%\n\x0e\
    partition_type\x18\x05\x20\x01(\tR\rpartitionType\x12\x10\n\x03dim\x18\
    \x07\x20\x01(\x04R\x03dim\x12\x14\n\x05count\x18\x08\x20\x01(\x04R\x05co\
    unt\x12\x1d\n\nroot_scale\x18\t\x20\x01(\x05R\trootScale\x12\x1d\n\nroot\
    _index\x18\n\x20\x01(\x04R\trootIndex\x12-\n\x06layers\x18\x0b\x20\x03(\
    \x0b2\x15.CoverTree.LayerProtoR\x06layersb\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

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 {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}
