#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct AnyValue {
pub value: ::std::option::Option<AnyValue_oneof_value>,
#[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 AnyValue {
fn default() -> &'a AnyValue {
<AnyValue as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub enum AnyValue_oneof_value {
string_value(::std::string::String),
bool_value(bool),
int_value(i64),
double_value(f64),
array_value(ArrayValue),
kvlist_value(KeyValueList),
bytes_value(::std::vec::Vec<u8>),
}
impl AnyValue {
pub fn new() -> AnyValue {
::std::default::Default::default()
}
pub fn get_string_value(&self) -> &str {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::string_value(ref v)) => v,
_ => "",
}
}
pub fn clear_string_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_string_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::string_value(..)) => true,
_ => false,
}
}
pub fn set_string_value(&mut self, v: ::std::string::String) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::string_value(v))
}
pub fn mut_string_value(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(AnyValue_oneof_value::string_value(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::string_value(::std::string::String::new()));
}
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::string_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_string_value(&mut self) -> ::std::string::String {
if self.has_string_value() {
match self.value.take() {
::std::option::Option::Some(AnyValue_oneof_value::string_value(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_bool_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::bool_value(v)) => v,
_ => false,
}
}
pub fn clear_bool_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_bool_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::bool_value(..)) => true,
_ => false,
}
}
pub fn set_bool_value(&mut self, v: bool) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::bool_value(v))
}
pub fn get_int_value(&self) -> i64 {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::int_value(v)) => v,
_ => 0,
}
}
pub fn clear_int_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_int_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::int_value(..)) => true,
_ => false,
}
}
pub fn set_int_value(&mut self, v: i64) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::int_value(v))
}
pub fn get_double_value(&self) -> f64 {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::double_value(v)) => v,
_ => 0.,
}
}
pub fn clear_double_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_double_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::double_value(..)) => true,
_ => false,
}
}
pub fn set_double_value(&mut self, v: f64) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::double_value(v))
}
pub fn get_array_value(&self) -> &ArrayValue {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::array_value(ref v)) => v,
_ => <ArrayValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_array_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_array_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::array_value(..)) => true,
_ => false,
}
}
pub fn set_array_value(&mut self, v: ArrayValue) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::array_value(v))
}
pub fn mut_array_value(&mut self) -> &mut ArrayValue {
if let ::std::option::Option::Some(AnyValue_oneof_value::array_value(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::array_value(ArrayValue::new()));
}
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::array_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_array_value(&mut self) -> ArrayValue {
if self.has_array_value() {
match self.value.take() {
::std::option::Option::Some(AnyValue_oneof_value::array_value(v)) => v,
_ => panic!(),
}
} else {
ArrayValue::new()
}
}
pub fn get_kvlist_value(&self) -> &KeyValueList {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(ref v)) => v,
_ => <KeyValueList as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_kvlist_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_kvlist_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(..)) => true,
_ => false,
}
}
pub fn set_kvlist_value(&mut self, v: KeyValueList) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(v))
}
pub fn mut_kvlist_value(&mut self) -> &mut KeyValueList {
if let ::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(KeyValueList::new()));
}
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_kvlist_value(&mut self) -> KeyValueList {
if self.has_kvlist_value() {
match self.value.take() {
::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(v)) => v,
_ => panic!(),
}
} else {
KeyValueList::new()
}
}
pub fn get_bytes_value(&self) -> &[u8] {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::bytes_value(ref v)) => v,
_ => &[],
}
}
pub fn clear_bytes_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_bytes_value(&self) -> bool {
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::bytes_value(..)) => true,
_ => false,
}
}
pub fn set_bytes_value(&mut self, v: ::std::vec::Vec<u8>) {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::bytes_value(v))
}
pub fn mut_bytes_value(&mut self) -> &mut ::std::vec::Vec<u8> {
if let ::std::option::Option::Some(AnyValue_oneof_value::bytes_value(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(AnyValue_oneof_value::bytes_value(::std::vec::Vec::new()));
}
match self.value {
::std::option::Option::Some(AnyValue_oneof_value::bytes_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_bytes_value(&mut self) -> ::std::vec::Vec<u8> {
if self.has_bytes_value() {
match self.value.take() {
::std::option::Option::Some(AnyValue_oneof_value::bytes_value(v)) => v,
_ => panic!(),
}
} else {
::std::vec::Vec::new()
}
}
}
impl ::protobuf::Message for AnyValue {
fn is_initialized(&self) -> bool {
if let Some(AnyValue_oneof_value::array_value(ref v)) = self.value {
if !v.is_initialized() {
return false;
}
}
if let Some(AnyValue_oneof_value::kvlist_value(ref v)) = self.value {
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::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::string_value(is.read_string()?));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::bool_value(is.read_bool()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::int_value(is.read_int64()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::double_value(is.read_double()?));
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::array_value(is.read_message()?));
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::kvlist_value(is.read_message()?));
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.value = ::std::option::Option::Some(AnyValue_oneof_value::bytes_value(is.read_bytes()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let ::std::option::Option::Some(ref v) = self.value {
match v {
&AnyValue_oneof_value::string_value(ref v) => {
my_size += ::protobuf::rt::string_size(1, &v);
},
&AnyValue_oneof_value::bool_value(v) => {
my_size += 2;
},
&AnyValue_oneof_value::int_value(v) => {
my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
},
&AnyValue_oneof_value::double_value(v) => {
my_size += 9;
},
&AnyValue_oneof_value::array_value(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&AnyValue_oneof_value::kvlist_value(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&AnyValue_oneof_value::bytes_value(ref v) => {
my_size += ::protobuf::rt::bytes_size(7, &v);
},
};
}
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 ::std::option::Option::Some(ref v) = self.value {
match v {
&AnyValue_oneof_value::string_value(ref v) => {
os.write_string(1, v)?;
},
&AnyValue_oneof_value::bool_value(v) => {
os.write_bool(2, v)?;
},
&AnyValue_oneof_value::int_value(v) => {
os.write_int64(3, v)?;
},
&AnyValue_oneof_value::double_value(v) => {
os.write_double(4, v)?;
},
&AnyValue_oneof_value::array_value(ref v) => {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&AnyValue_oneof_value::kvlist_value(ref v) => {
os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&AnyValue_oneof_value::bytes_value(ref v) => {
os.write_bytes(7, 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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> AnyValue {
AnyValue::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_singular_string_accessor::<_>(
"string_value",
AnyValue::has_string_value,
AnyValue::get_string_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
"bool_value",
AnyValue::has_bool_value,
AnyValue::get_bool_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_i64_accessor::<_>(
"int_value",
AnyValue::has_int_value,
AnyValue::get_int_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_f64_accessor::<_>(
"double_value",
AnyValue::has_double_value,
AnyValue::get_double_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ArrayValue>(
"array_value",
AnyValue::has_array_value,
AnyValue::get_array_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, KeyValueList>(
"kvlist_value",
AnyValue::has_kvlist_value,
AnyValue::get_kvlist_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
"bytes_value",
AnyValue::has_bytes_value,
AnyValue::get_bytes_value,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<AnyValue>(
"AnyValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static AnyValue {
static instance: ::protobuf::rt::LazyV2<AnyValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(AnyValue::new)
}
}
impl ::protobuf::Clear for AnyValue {
fn clear(&mut self) {
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for AnyValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AnyValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct ArrayValue {
pub values: ::protobuf::RepeatedField<AnyValue>,
#[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 ArrayValue {
fn default() -> &'a ArrayValue {
<ArrayValue as ::protobuf::Message>::default_instance()
}
}
impl ArrayValue {
pub fn new() -> ArrayValue {
::std::default::Default::default()
}
pub fn get_values(&self) -> &[AnyValue] {
&self.values
}
pub fn clear_values(&mut self) {
self.values.clear();
}
pub fn set_values(&mut self, v: ::protobuf::RepeatedField<AnyValue>) {
self.values = v;
}
pub fn mut_values(&mut self) -> &mut ::protobuf::RepeatedField<AnyValue> {
&mut self.values
}
pub fn take_values(&mut self) -> ::protobuf::RepeatedField<AnyValue> {
::std::mem::replace(&mut self.values, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for ArrayValue {
fn is_initialized(&self) -> bool {
for v in &self.values {
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_repeated_message_into(wire_type, is, &mut self.values)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.values {
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<()> {
for v in &self.values {
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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ArrayValue {
ArrayValue::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AnyValue>>(
"values",
|m: &ArrayValue| { &m.values },
|m: &mut ArrayValue| { &mut m.values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ArrayValue>(
"ArrayValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ArrayValue {
static instance: ::protobuf::rt::LazyV2<ArrayValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(ArrayValue::new)
}
}
impl ::protobuf::Clear for ArrayValue {
fn clear(&mut self) {
self.values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ArrayValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ArrayValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct KeyValueList {
pub values: ::protobuf::RepeatedField<KeyValue>,
#[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 KeyValueList {
fn default() -> &'a KeyValueList {
<KeyValueList as ::protobuf::Message>::default_instance()
}
}
impl KeyValueList {
pub fn new() -> KeyValueList {
::std::default::Default::default()
}
pub fn get_values(&self) -> &[KeyValue] {
&self.values
}
pub fn clear_values(&mut self) {
self.values.clear();
}
pub fn set_values(&mut self, v: ::protobuf::RepeatedField<KeyValue>) {
self.values = v;
}
pub fn mut_values(&mut self) -> &mut ::protobuf::RepeatedField<KeyValue> {
&mut self.values
}
pub fn take_values(&mut self) -> ::protobuf::RepeatedField<KeyValue> {
::std::mem::replace(&mut self.values, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for KeyValueList {
fn is_initialized(&self) -> bool {
for v in &self.values {
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_repeated_message_into(wire_type, is, &mut self.values)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.values {
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<()> {
for v in &self.values {
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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> KeyValueList {
KeyValueList::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyValue>>(
"values",
|m: &KeyValueList| { &m.values },
|m: &mut KeyValueList| { &mut m.values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<KeyValueList>(
"KeyValueList",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static KeyValueList {
static instance: ::protobuf::rt::LazyV2<KeyValueList> = ::protobuf::rt::LazyV2::INIT;
instance.get(KeyValueList::new)
}
}
impl ::protobuf::Clear for KeyValueList {
fn clear(&mut self) {
self.values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for KeyValueList {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for KeyValueList {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct KeyValue {
pub key: ::std::string::String,
pub value: ::protobuf::SingularPtrField<AnyValue>,
#[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 KeyValue {
fn default() -> &'a KeyValue {
<KeyValue as ::protobuf::Message>::default_instance()
}
}
impl KeyValue {
pub fn new() -> KeyValue {
::std::default::Default::default()
}
pub fn get_key(&self) -> &str {
&self.key
}
pub fn clear_key(&mut self) {
self.key.clear();
}
pub fn set_key(&mut self, v: ::std::string::String) {
self.key = v;
}
pub fn mut_key(&mut self) -> &mut ::std::string::String {
&mut self.key
}
pub fn take_key(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.key, ::std::string::String::new())
}
pub fn get_value(&self) -> &AnyValue {
self.value.as_ref().unwrap_or_else(|| <AnyValue as ::protobuf::Message>::default_instance())
}
pub fn clear_value(&mut self) {
self.value.clear();
}
pub fn has_value(&self) -> bool {
self.value.is_some()
}
pub fn set_value(&mut self, v: AnyValue) {
self.value = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_value(&mut self) -> &mut AnyValue {
if self.value.is_none() {
self.value.set_default();
}
self.value.as_mut().unwrap()
}
pub fn take_value(&mut self) -> AnyValue {
self.value.take().unwrap_or_else(|| AnyValue::new())
}
}
impl ::protobuf::Message for KeyValue {
fn is_initialized(&self) -> bool {
for v in &self.value {
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.key)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.value)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.key.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.key);
}
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;
}
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.key.is_empty() {
os.write_string(1, &self.key)?;
}
if let Some(ref v) = self.value.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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> KeyValue {
KeyValue::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::ProtobufTypeString>(
"key",
|m: &KeyValue| { &m.key },
|m: &mut KeyValue| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AnyValue>>(
"value",
|m: &KeyValue| { &m.value },
|m: &mut KeyValue| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<KeyValue>(
"KeyValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static KeyValue {
static instance: ::protobuf::rt::LazyV2<KeyValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(KeyValue::new)
}
}
impl ::protobuf::Clear for KeyValue {
fn clear(&mut self) {
self.key.clear();
self.value.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for KeyValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for KeyValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct InstrumentationScope {
pub name: ::std::string::String,
pub version: ::std::string::String,
pub attributes: ::protobuf::RepeatedField<KeyValue>,
pub dropped_attributes_count: u32,
#[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 InstrumentationScope {
fn default() -> &'a InstrumentationScope {
<InstrumentationScope as ::protobuf::Message>::default_instance()
}
}
impl InstrumentationScope {
pub fn new() -> InstrumentationScope {
::std::default::Default::default()
}
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
pub fn get_version(&self) -> &str {
&self.version
}
pub fn clear_version(&mut self) {
self.version.clear();
}
pub fn set_version(&mut self, v: ::std::string::String) {
self.version = v;
}
pub fn mut_version(&mut self) -> &mut ::std::string::String {
&mut self.version
}
pub fn take_version(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.version, ::std::string::String::new())
}
pub fn get_attributes(&self) -> &[KeyValue] {
&self.attributes
}
pub fn clear_attributes(&mut self) {
self.attributes.clear();
}
pub fn set_attributes(&mut self, v: ::protobuf::RepeatedField<KeyValue>) {
self.attributes = v;
}
pub fn mut_attributes(&mut self) -> &mut ::protobuf::RepeatedField<KeyValue> {
&mut self.attributes
}
pub fn take_attributes(&mut self) -> ::protobuf::RepeatedField<KeyValue> {
::std::mem::replace(&mut self.attributes, ::protobuf::RepeatedField::new())
}
pub fn get_dropped_attributes_count(&self) -> u32 {
self.dropped_attributes_count
}
pub fn clear_dropped_attributes_count(&mut self) {
self.dropped_attributes_count = 0;
}
pub fn set_dropped_attributes_count(&mut self, v: u32) {
self.dropped_attributes_count = v;
}
}
impl ::protobuf::Message for InstrumentationScope {
fn is_initialized(&self) -> bool {
for v in &self.attributes {
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.name)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?;
},
3 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attributes)?;
},
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.dropped_attributes_count = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
if !self.version.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.version);
}
for value in &self.attributes {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.dropped_attributes_count != 0 {
my_size += ::protobuf::rt::value_size(4, self.dropped_attributes_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.name.is_empty() {
os.write_string(1, &self.name)?;
}
if !self.version.is_empty() {
os.write_string(2, &self.version)?;
}
for v in &self.attributes {
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.dropped_attributes_count != 0 {
os.write_uint32(4, self.dropped_attributes_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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> InstrumentationScope {
InstrumentationScope::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::ProtobufTypeString>(
"name",
|m: &InstrumentationScope| { &m.name },
|m: &mut InstrumentationScope| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"version",
|m: &InstrumentationScope| { &m.version },
|m: &mut InstrumentationScope| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyValue>>(
"attributes",
|m: &InstrumentationScope| { &m.attributes },
|m: &mut InstrumentationScope| { &mut m.attributes },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"dropped_attributes_count",
|m: &InstrumentationScope| { &m.dropped_attributes_count },
|m: &mut InstrumentationScope| { &mut m.dropped_attributes_count },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<InstrumentationScope>(
"InstrumentationScope",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static InstrumentationScope {
static instance: ::protobuf::rt::LazyV2<InstrumentationScope> = ::protobuf::rt::LazyV2::INIT;
instance.get(InstrumentationScope::new)
}
}
impl ::protobuf::Clear for InstrumentationScope {
fn clear(&mut self) {
self.name.clear();
self.version.clear();
self.attributes.clear();
self.dropped_attributes_count = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for InstrumentationScope {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for InstrumentationScope {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n*opentelemetry/proto/common/v1/common.proto\x12\x1dopentelemetry.proto\
.common.v1\"\xe0\x02\n\x08AnyValue\x12#\n\x0cstring_value\x18\x01\x20\
\x01(\tH\0R\x0bstringValue\x12\x1f\n\nbool_value\x18\x02\x20\x01(\x08H\0\
R\tboolValue\x12\x1d\n\tint_value\x18\x03\x20\x01(\x03H\0R\x08intValue\
\x12#\n\x0cdouble_value\x18\x04\x20\x01(\x01H\0R\x0bdoubleValue\x12L\n\
\x0barray_value\x18\x05\x20\x01(\x0b2).opentelemetry.proto.common.v1.Arr\
ayValueH\0R\narrayValue\x12P\n\x0ckvlist_value\x18\x06\x20\x01(\x0b2+.op\
entelemetry.proto.common.v1.KeyValueListH\0R\x0bkvlistValue\x12!\n\x0bby\
tes_value\x18\x07\x20\x01(\x0cH\0R\nbytesValueB\x07\n\x05value\"M\n\nArr\
ayValue\x12?\n\x06values\x18\x01\x20\x03(\x0b2'.opentelemetry.proto.comm\
on.v1.AnyValueR\x06values\"O\n\x0cKeyValueList\x12?\n\x06values\x18\x01\
\x20\x03(\x0b2'.opentelemetry.proto.common.v1.KeyValueR\x06values\"[\n\
\x08KeyValue\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12=\n\x05value\
\x18\x02\x20\x01(\x0b2'.opentelemetry.proto.common.v1.AnyValueR\x05value\
\"\xc7\x01\n\x14InstrumentationScope\x12\x12\n\x04name\x18\x01\x20\x01(\
\tR\x04name\x12\x18\n\x07version\x18\x02\x20\x01(\tR\x07version\x12G\n\n\
attributes\x18\x03\x20\x03(\x0b2'.opentelemetry.proto.common.v1.KeyValue\
R\nattributes\x128\n\x18dropped_attributes_count\x18\x04\x20\x01(\rR\x16\
droppedAttributesCountB{\n\x20io.opentelemetry.proto.common.v1B\x0bCommo\
nProtoP\x01Z(go.opentelemetry.io/proto/otlp/common/v1\xaa\x02\x1dOpenTel\
emetry.Proto.Common.V1b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::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()
})
}