#![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)]
pub struct StructuredValue {
pub kind: ::std::option::Option<StructuredValue_oneof_kind>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a StructuredValue {
fn default() -> &'a StructuredValue {
<StructuredValue as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum StructuredValue_oneof_kind {
none_value(NoneValue),
float64_value(f64),
int64_value(i64),
string_value(::std::string::String),
bool_value(bool),
tensor_shape_value(super::tensor_shape::TensorShapeProto),
tensor_dtype_value(super::types::DataType),
tensor_spec_value(TensorSpecProto),
type_spec_value(TypeSpecProto),
bounded_tensor_spec_value(BoundedTensorSpecProto),
list_value(ListValue),
tuple_value(TupleValue),
dict_value(DictValue),
named_tuple_value(NamedTupleValue),
tensor_value(super::tensor::TensorProto),
}
impl StructuredValue {
pub fn new() -> StructuredValue {
::std::default::Default::default()
}
pub fn get_none_value(&self) -> &NoneValue {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::none_value(ref v)) => v,
_ => <NoneValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_none_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_none_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::none_value(..)) => true,
_ => false,
}
}
pub fn set_none_value(&mut self, v: NoneValue) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::none_value(v))
}
pub fn mut_none_value(&mut self) -> &mut NoneValue {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::none_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::none_value(NoneValue::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::none_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_none_value(&mut self) -> NoneValue {
if self.has_none_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::none_value(v)) => v,
_ => panic!(),
}
} else {
NoneValue::new()
}
}
pub fn get_float64_value(&self) -> f64 {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::float64_value(v)) => v,
_ => 0.,
}
}
pub fn clear_float64_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_float64_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::float64_value(..)) => true,
_ => false,
}
}
pub fn set_float64_value(&mut self, v: f64) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::float64_value(v))
}
pub fn get_int64_value(&self) -> i64 {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::int64_value(v)) => v,
_ => 0,
}
}
pub fn clear_int64_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_int64_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::int64_value(..)) => true,
_ => false,
}
}
pub fn set_int64_value(&mut self, v: i64) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::int64_value(v))
}
pub fn get_string_value(&self) -> &str {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::string_value(ref v)) => v,
_ => "",
}
}
pub fn clear_string_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_string_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::string_value(..)) => true,
_ => false,
}
}
pub fn set_string_value(&mut self, v: ::std::string::String) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::string_value(v))
}
pub fn mut_string_value(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::string_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::string_value(::std::string::String::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::string_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_string_value(&mut self) -> ::std::string::String {
if self.has_string_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::string_value(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_bool_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::bool_value(v)) => v,
_ => false,
}
}
pub fn clear_bool_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_bool_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::bool_value(..)) => true,
_ => false,
}
}
pub fn set_bool_value(&mut self, v: bool) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::bool_value(v))
}
pub fn get_tensor_shape_value(&self) -> &super::tensor_shape::TensorShapeProto {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(ref v)) => v,
_ => <super::tensor_shape::TensorShapeProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_tensor_shape_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_tensor_shape_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(..)) => true,
_ => false,
}
}
pub fn set_tensor_shape_value(&mut self, v: super::tensor_shape::TensorShapeProto) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(v))
}
pub fn mut_tensor_shape_value(&mut self) -> &mut super::tensor_shape::TensorShapeProto {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(super::tensor_shape::TensorShapeProto::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_tensor_shape_value(&mut self) -> super::tensor_shape::TensorShapeProto {
if self.has_tensor_shape_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(v)) => v,
_ => panic!(),
}
} else {
super::tensor_shape::TensorShapeProto::new()
}
}
pub fn get_tensor_dtype_value(&self) -> super::types::DataType {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_dtype_value(v)) => v,
_ => super::types::DataType::DT_INVALID,
}
}
pub fn clear_tensor_dtype_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_tensor_dtype_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_dtype_value(..)) => true,
_ => false,
}
}
pub fn set_tensor_dtype_value(&mut self, v: super::types::DataType) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_dtype_value(v))
}
pub fn get_tensor_spec_value(&self) -> &TensorSpecProto {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(ref v)) => v,
_ => <TensorSpecProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_tensor_spec_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_tensor_spec_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(..)) => true,
_ => false,
}
}
pub fn set_tensor_spec_value(&mut self, v: TensorSpecProto) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(v))
}
pub fn mut_tensor_spec_value(&mut self) -> &mut TensorSpecProto {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(TensorSpecProto::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_tensor_spec_value(&mut self) -> TensorSpecProto {
if self.has_tensor_spec_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(v)) => v,
_ => panic!(),
}
} else {
TensorSpecProto::new()
}
}
pub fn get_type_spec_value(&self) -> &TypeSpecProto {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(ref v)) => v,
_ => <TypeSpecProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_type_spec_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_type_spec_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(..)) => true,
_ => false,
}
}
pub fn set_type_spec_value(&mut self, v: TypeSpecProto) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(v))
}
pub fn mut_type_spec_value(&mut self) -> &mut TypeSpecProto {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(TypeSpecProto::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_type_spec_value(&mut self) -> TypeSpecProto {
if self.has_type_spec_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(v)) => v,
_ => panic!(),
}
} else {
TypeSpecProto::new()
}
}
pub fn get_bounded_tensor_spec_value(&self) -> &BoundedTensorSpecProto {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(ref v)) => v,
_ => <BoundedTensorSpecProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_bounded_tensor_spec_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_bounded_tensor_spec_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(..)) => true,
_ => false,
}
}
pub fn set_bounded_tensor_spec_value(&mut self, v: BoundedTensorSpecProto) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(v))
}
pub fn mut_bounded_tensor_spec_value(&mut self) -> &mut BoundedTensorSpecProto {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(BoundedTensorSpecProto::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_bounded_tensor_spec_value(&mut self) -> BoundedTensorSpecProto {
if self.has_bounded_tensor_spec_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(v)) => v,
_ => panic!(),
}
} else {
BoundedTensorSpecProto::new()
}
}
pub fn get_list_value(&self) -> &ListValue {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::list_value(ref v)) => v,
_ => <ListValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_list_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_list_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::list_value(..)) => true,
_ => false,
}
}
pub fn set_list_value(&mut self, v: ListValue) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::list_value(v))
}
pub fn mut_list_value(&mut self) -> &mut ListValue {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::list_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::list_value(ListValue::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::list_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_list_value(&mut self) -> ListValue {
if self.has_list_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::list_value(v)) => v,
_ => panic!(),
}
} else {
ListValue::new()
}
}
pub fn get_tuple_value(&self) -> &TupleValue {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(ref v)) => v,
_ => <TupleValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_tuple_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_tuple_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(..)) => true,
_ => false,
}
}
pub fn set_tuple_value(&mut self, v: TupleValue) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(v))
}
pub fn mut_tuple_value(&mut self) -> &mut TupleValue {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(TupleValue::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_tuple_value(&mut self) -> TupleValue {
if self.has_tuple_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(v)) => v,
_ => panic!(),
}
} else {
TupleValue::new()
}
}
pub fn get_dict_value(&self) -> &DictValue {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(ref v)) => v,
_ => <DictValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_dict_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_dict_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(..)) => true,
_ => false,
}
}
pub fn set_dict_value(&mut self, v: DictValue) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(v))
}
pub fn mut_dict_value(&mut self) -> &mut DictValue {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(DictValue::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_dict_value(&mut self) -> DictValue {
if self.has_dict_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(v)) => v,
_ => panic!(),
}
} else {
DictValue::new()
}
}
pub fn get_named_tuple_value(&self) -> &NamedTupleValue {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(ref v)) => v,
_ => <NamedTupleValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_named_tuple_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_named_tuple_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(..)) => true,
_ => false,
}
}
pub fn set_named_tuple_value(&mut self, v: NamedTupleValue) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(v))
}
pub fn mut_named_tuple_value(&mut self) -> &mut NamedTupleValue {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(NamedTupleValue::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_named_tuple_value(&mut self) -> NamedTupleValue {
if self.has_named_tuple_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(v)) => v,
_ => panic!(),
}
} else {
NamedTupleValue::new()
}
}
pub fn get_tensor_value(&self) -> &super::tensor::TensorProto {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(ref v)) => v,
_ => <super::tensor::TensorProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_tensor_value(&mut self) {
self.kind = ::std::option::Option::None;
}
pub fn has_tensor_value(&self) -> bool {
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(..)) => true,
_ => false,
}
}
pub fn set_tensor_value(&mut self, v: super::tensor::TensorProto) {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(v))
}
pub fn mut_tensor_value(&mut self) -> &mut super::tensor::TensorProto {
if let ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(_)) = self.kind {
} else {
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(super::tensor::TensorProto::new()));
}
match self.kind {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_tensor_value(&mut self) -> super::tensor::TensorProto {
if self.has_tensor_value() {
match self.kind.take() {
::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(v)) => v,
_ => panic!(),
}
} else {
super::tensor::TensorProto::new()
}
}
}
impl ::protobuf::Message for StructuredValue {
fn is_initialized(&self) -> bool {
if let Some(StructuredValue_oneof_kind::none_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::tensor_shape_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::tensor_spec_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::type_spec_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::list_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::tuple_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::dict_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::named_tuple_value(ref v)) = self.kind {
if !v.is_initialized() {
return false;
}
}
if let Some(StructuredValue_oneof_kind::tensor_value(ref v)) = self.kind {
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.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::none_value(is.read_message()?));
},
11 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::float64_value(is.read_double()?));
},
12 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::int64_value(is.read_sint64()?));
},
13 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::string_value(is.read_string()?));
},
14 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::bool_value(is.read_bool()?));
},
31 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_shape_value(is.read_message()?));
},
32 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_dtype_value(is.read_enum()?));
},
33 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_spec_value(is.read_message()?));
},
34 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::type_spec_value(is.read_message()?));
},
35 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::bounded_tensor_spec_value(is.read_message()?));
},
51 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::list_value(is.read_message()?));
},
52 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tuple_value(is.read_message()?));
},
53 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::dict_value(is.read_message()?));
},
54 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::named_tuple_value(is.read_message()?));
},
55 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.kind = ::std::option::Option::Some(StructuredValue_oneof_kind::tensor_value(is.read_message()?));
},
_ => {
::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.kind {
match v {
&StructuredValue_oneof_kind::none_value(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::float64_value(v) => {
my_size += 9;
},
&StructuredValue_oneof_kind::int64_value(v) => {
my_size += ::protobuf::rt::value_varint_zigzag_size(12, v);
},
&StructuredValue_oneof_kind::string_value(ref v) => {
my_size += ::protobuf::rt::string_size(13, &v);
},
&StructuredValue_oneof_kind::bool_value(v) => {
my_size += 2;
},
&StructuredValue_oneof_kind::tensor_shape_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::tensor_dtype_value(v) => {
my_size += ::protobuf::rt::enum_size(32, v);
},
&StructuredValue_oneof_kind::tensor_spec_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::type_spec_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::bounded_tensor_spec_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::list_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::tuple_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::dict_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::named_tuple_value(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StructuredValue_oneof_kind::tensor_value(ref v) => {
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 ::std::option::Option::Some(ref v) = self.kind {
match v {
&StructuredValue_oneof_kind::none_value(ref v) => {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::float64_value(v) => {
os.write_double(11, v)?;
},
&StructuredValue_oneof_kind::int64_value(v) => {
os.write_sint64(12, v)?;
},
&StructuredValue_oneof_kind::string_value(ref v) => {
os.write_string(13, v)?;
},
&StructuredValue_oneof_kind::bool_value(v) => {
os.write_bool(14, v)?;
},
&StructuredValue_oneof_kind::tensor_shape_value(ref v) => {
os.write_tag(31, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::tensor_dtype_value(v) => {
os.write_enum(32, ::protobuf::ProtobufEnum::value(&v))?;
},
&StructuredValue_oneof_kind::tensor_spec_value(ref v) => {
os.write_tag(33, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::type_spec_value(ref v) => {
os.write_tag(34, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::bounded_tensor_spec_value(ref v) => {
os.write_tag(35, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::list_value(ref v) => {
os.write_tag(51, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::tuple_value(ref v) => {
os.write_tag(52, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::dict_value(ref v) => {
os.write_tag(53, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::named_tuple_value(ref v) => {
os.write_tag(54, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StructuredValue_oneof_kind::tensor_value(ref v) => {
os.write_tag(55, ::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() -> StructuredValue {
StructuredValue::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_message_accessor::<_, NoneValue>(
"none_value",
StructuredValue::has_none_value,
StructuredValue::get_none_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_f64_accessor::<_>(
"float64_value",
StructuredValue::has_float64_value,
StructuredValue::get_float64_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_i64_accessor::<_>(
"int64_value",
StructuredValue::has_int64_value,
StructuredValue::get_int64_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"string_value",
StructuredValue::has_string_value,
StructuredValue::get_string_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
"bool_value",
StructuredValue::has_bool_value,
StructuredValue::get_bool_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::tensor_shape::TensorShapeProto>(
"tensor_shape_value",
StructuredValue::has_tensor_shape_value,
StructuredValue::get_tensor_shape_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_enum_accessor::<_, super::types::DataType>(
"tensor_dtype_value",
StructuredValue::has_tensor_dtype_value,
StructuredValue::get_tensor_dtype_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, TensorSpecProto>(
"tensor_spec_value",
StructuredValue::has_tensor_spec_value,
StructuredValue::get_tensor_spec_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, TypeSpecProto>(
"type_spec_value",
StructuredValue::has_type_spec_value,
StructuredValue::get_type_spec_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, BoundedTensorSpecProto>(
"bounded_tensor_spec_value",
StructuredValue::has_bounded_tensor_spec_value,
StructuredValue::get_bounded_tensor_spec_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ListValue>(
"list_value",
StructuredValue::has_list_value,
StructuredValue::get_list_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, TupleValue>(
"tuple_value",
StructuredValue::has_tuple_value,
StructuredValue::get_tuple_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, DictValue>(
"dict_value",
StructuredValue::has_dict_value,
StructuredValue::get_dict_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, NamedTupleValue>(
"named_tuple_value",
StructuredValue::has_named_tuple_value,
StructuredValue::get_named_tuple_value,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::tensor::TensorProto>(
"tensor_value",
StructuredValue::has_tensor_value,
StructuredValue::get_tensor_value,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<StructuredValue>(
"StructuredValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static StructuredValue {
static instance: ::protobuf::rt::LazyV2<StructuredValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(StructuredValue::new)
}
}
impl ::protobuf::Clear for StructuredValue {
fn clear(&mut self) {
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.kind = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for StructuredValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for StructuredValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct NoneValue {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a NoneValue {
fn default() -> &'a NoneValue {
<NoneValue as ::protobuf::Message>::default_instance()
}
}
impl NoneValue {
pub fn new() -> NoneValue {
::std::default::Default::default()
}
}
impl ::protobuf::Message for NoneValue {
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 {
_ => {
::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;
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<()> {
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() -> NoneValue {
NoneValue::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<NoneValue>(
"NoneValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static NoneValue {
static instance: ::protobuf::rt::LazyV2<NoneValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(NoneValue::new)
}
}
impl ::protobuf::Clear for NoneValue {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for NoneValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NoneValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ListValue {
pub values: ::protobuf::RepeatedField<StructuredValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ListValue {
fn default() -> &'a ListValue {
<ListValue as ::protobuf::Message>::default_instance()
}
}
impl ListValue {
pub fn new() -> ListValue {
::std::default::Default::default()
}
pub fn get_values(&self) -> &[StructuredValue] {
&self.values
}
pub fn clear_values(&mut self) {
self.values.clear();
}
pub fn set_values(&mut self, v: ::protobuf::RepeatedField<StructuredValue>) {
self.values = v;
}
pub fn mut_values(&mut self) -> &mut ::protobuf::RepeatedField<StructuredValue> {
&mut self.values
}
pub fn take_values(&mut self) -> ::protobuf::RepeatedField<StructuredValue> {
::std::mem::replace(&mut self.values, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for ListValue {
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() -> ListValue {
ListValue::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<StructuredValue>>(
"values",
|m: &ListValue| { &m.values },
|m: &mut ListValue| { &mut m.values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ListValue>(
"ListValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ListValue {
static instance: ::protobuf::rt::LazyV2<ListValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(ListValue::new)
}
}
impl ::protobuf::Clear for ListValue {
fn clear(&mut self) {
self.values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ListValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ListValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct TupleValue {
pub values: ::protobuf::RepeatedField<StructuredValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a TupleValue {
fn default() -> &'a TupleValue {
<TupleValue as ::protobuf::Message>::default_instance()
}
}
impl TupleValue {
pub fn new() -> TupleValue {
::std::default::Default::default()
}
pub fn get_values(&self) -> &[StructuredValue] {
&self.values
}
pub fn clear_values(&mut self) {
self.values.clear();
}
pub fn set_values(&mut self, v: ::protobuf::RepeatedField<StructuredValue>) {
self.values = v;
}
pub fn mut_values(&mut self) -> &mut ::protobuf::RepeatedField<StructuredValue> {
&mut self.values
}
pub fn take_values(&mut self) -> ::protobuf::RepeatedField<StructuredValue> {
::std::mem::replace(&mut self.values, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for TupleValue {
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() -> TupleValue {
TupleValue::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<StructuredValue>>(
"values",
|m: &TupleValue| { &m.values },
|m: &mut TupleValue| { &mut m.values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<TupleValue>(
"TupleValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static TupleValue {
static instance: ::protobuf::rt::LazyV2<TupleValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(TupleValue::new)
}
}
impl ::protobuf::Clear for TupleValue {
fn clear(&mut self) {
self.values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for TupleValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TupleValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct DictValue {
pub fields: ::std::collections::HashMap<::std::string::String, StructuredValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a DictValue {
fn default() -> &'a DictValue {
<DictValue as ::protobuf::Message>::default_instance()
}
}
impl DictValue {
pub fn new() -> DictValue {
::std::default::Default::default()
}
pub fn get_fields(&self) -> &::std::collections::HashMap<::std::string::String, StructuredValue> {
&self.fields
}
pub fn clear_fields(&mut self) {
self.fields.clear();
}
pub fn set_fields(&mut self, v: ::std::collections::HashMap<::std::string::String, StructuredValue>) {
self.fields = v;
}
pub fn mut_fields(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, StructuredValue> {
&mut self.fields
}
pub fn take_fields(&mut self) -> ::std::collections::HashMap<::std::string::String, StructuredValue> {
::std::mem::replace(&mut self.fields, ::std::collections::HashMap::new())
}
}
impl ::protobuf::Message for DictValue {
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_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(wire_type, is, &mut self.fields)?;
},
_ => {
::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;
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(1, &self.fields);
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<()> {
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(1, &self.fields, 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() -> DictValue {
DictValue::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_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(
"fields",
|m: &DictValue| { &m.fields },
|m: &mut DictValue| { &mut m.fields },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<DictValue>(
"DictValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static DictValue {
static instance: ::protobuf::rt::LazyV2<DictValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(DictValue::new)
}
}
impl ::protobuf::Clear for DictValue {
fn clear(&mut self) {
self.fields.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for DictValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for DictValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct PairValue {
pub key: ::std::string::String,
pub value: ::protobuf::SingularPtrField<StructuredValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PairValue {
fn default() -> &'a PairValue {
<PairValue as ::protobuf::Message>::default_instance()
}
}
impl PairValue {
pub fn new() -> PairValue {
::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) -> &StructuredValue {
self.value.as_ref().unwrap_or_else(|| <StructuredValue 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: StructuredValue) {
self.value = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_value(&mut self) -> &mut StructuredValue {
if self.value.is_none() {
self.value.set_default();
}
self.value.as_mut().unwrap()
}
pub fn take_value(&mut self) -> StructuredValue {
self.value.take().unwrap_or_else(|| StructuredValue::new())
}
}
impl ::protobuf::Message for PairValue {
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() -> PairValue {
PairValue::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: &PairValue| { &m.key },
|m: &mut PairValue| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(
"value",
|m: &PairValue| { &m.value },
|m: &mut PairValue| { &mut m.value },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<PairValue>(
"PairValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static PairValue {
static instance: ::protobuf::rt::LazyV2<PairValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(PairValue::new)
}
}
impl ::protobuf::Clear for PairValue {
fn clear(&mut self) {
self.key.clear();
self.value.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PairValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PairValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct NamedTupleValue {
pub name: ::std::string::String,
pub values: ::protobuf::RepeatedField<PairValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a NamedTupleValue {
fn default() -> &'a NamedTupleValue {
<NamedTupleValue as ::protobuf::Message>::default_instance()
}
}
impl NamedTupleValue {
pub fn new() -> NamedTupleValue {
::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_values(&self) -> &[PairValue] {
&self.values
}
pub fn clear_values(&mut self) {
self.values.clear();
}
pub fn set_values(&mut self, v: ::protobuf::RepeatedField<PairValue>) {
self.values = v;
}
pub fn mut_values(&mut self) -> &mut ::protobuf::RepeatedField<PairValue> {
&mut self.values
}
pub fn take_values(&mut self) -> ::protobuf::RepeatedField<PairValue> {
::std::mem::replace(&mut self.values, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for NamedTupleValue {
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_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
2 => {
::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;
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
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<()> {
if !self.name.is_empty() {
os.write_string(1, &self.name)?;
}
for v in &self.values {
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() -> NamedTupleValue {
NamedTupleValue::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: &NamedTupleValue| { &m.name },
|m: &mut NamedTupleValue| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PairValue>>(
"values",
|m: &NamedTupleValue| { &m.values },
|m: &mut NamedTupleValue| { &mut m.values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<NamedTupleValue>(
"NamedTupleValue",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static NamedTupleValue {
static instance: ::protobuf::rt::LazyV2<NamedTupleValue> = ::protobuf::rt::LazyV2::INIT;
instance.get(NamedTupleValue::new)
}
}
impl ::protobuf::Clear for NamedTupleValue {
fn clear(&mut self) {
self.name.clear();
self.values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for NamedTupleValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NamedTupleValue {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct TensorSpecProto {
pub name: ::std::string::String,
pub shape: ::protobuf::SingularPtrField<super::tensor_shape::TensorShapeProto>,
pub dtype: super::types::DataType,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a TensorSpecProto {
fn default() -> &'a TensorSpecProto {
<TensorSpecProto as ::protobuf::Message>::default_instance()
}
}
impl TensorSpecProto {
pub fn new() -> TensorSpecProto {
::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_shape(&self) -> &super::tensor_shape::TensorShapeProto {
self.shape.as_ref().unwrap_or_else(|| <super::tensor_shape::TensorShapeProto as ::protobuf::Message>::default_instance())
}
pub fn clear_shape(&mut self) {
self.shape.clear();
}
pub fn has_shape(&self) -> bool {
self.shape.is_some()
}
pub fn set_shape(&mut self, v: super::tensor_shape::TensorShapeProto) {
self.shape = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_shape(&mut self) -> &mut super::tensor_shape::TensorShapeProto {
if self.shape.is_none() {
self.shape.set_default();
}
self.shape.as_mut().unwrap()
}
pub fn take_shape(&mut self) -> super::tensor_shape::TensorShapeProto {
self.shape.take().unwrap_or_else(|| super::tensor_shape::TensorShapeProto::new())
}
pub fn get_dtype(&self) -> super::types::DataType {
self.dtype
}
pub fn clear_dtype(&mut self) {
self.dtype = super::types::DataType::DT_INVALID;
}
pub fn set_dtype(&mut self, v: super::types::DataType) {
self.dtype = v;
}
}
impl ::protobuf::Message for TensorSpecProto {
fn is_initialized(&self) -> bool {
for v in &self.shape {
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_message_into(wire_type, is, &mut self.shape)?;
},
3 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.dtype, 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(())
}
#[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 let Some(ref v) = self.shape.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.dtype != super::types::DataType::DT_INVALID {
my_size += ::protobuf::rt::enum_size(3, self.dtype);
}
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 let Some(ref v) = self.shape.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 self.dtype != super::types::DataType::DT_INVALID {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.dtype))?;
}
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() -> TensorSpecProto {
TensorSpecProto::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: &TensorSpecProto| { &m.name },
|m: &mut TensorSpecProto| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tensor_shape::TensorShapeProto>>(
"shape",
|m: &TensorSpecProto| { &m.shape },
|m: &mut TensorSpecProto| { &mut m.shape },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::types::DataType>>(
"dtype",
|m: &TensorSpecProto| { &m.dtype },
|m: &mut TensorSpecProto| { &mut m.dtype },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<TensorSpecProto>(
"TensorSpecProto",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static TensorSpecProto {
static instance: ::protobuf::rt::LazyV2<TensorSpecProto> = ::protobuf::rt::LazyV2::INIT;
instance.get(TensorSpecProto::new)
}
}
impl ::protobuf::Clear for TensorSpecProto {
fn clear(&mut self) {
self.name.clear();
self.shape.clear();
self.dtype = super::types::DataType::DT_INVALID;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for TensorSpecProto {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TensorSpecProto {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct BoundedTensorSpecProto {
pub name: ::std::string::String,
pub shape: ::protobuf::SingularPtrField<super::tensor_shape::TensorShapeProto>,
pub dtype: super::types::DataType,
pub minimum: ::protobuf::SingularPtrField<super::tensor::TensorProto>,
pub maximum: ::protobuf::SingularPtrField<super::tensor::TensorProto>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a BoundedTensorSpecProto {
fn default() -> &'a BoundedTensorSpecProto {
<BoundedTensorSpecProto as ::protobuf::Message>::default_instance()
}
}
impl BoundedTensorSpecProto {
pub fn new() -> BoundedTensorSpecProto {
::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_shape(&self) -> &super::tensor_shape::TensorShapeProto {
self.shape.as_ref().unwrap_or_else(|| <super::tensor_shape::TensorShapeProto as ::protobuf::Message>::default_instance())
}
pub fn clear_shape(&mut self) {
self.shape.clear();
}
pub fn has_shape(&self) -> bool {
self.shape.is_some()
}
pub fn set_shape(&mut self, v: super::tensor_shape::TensorShapeProto) {
self.shape = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_shape(&mut self) -> &mut super::tensor_shape::TensorShapeProto {
if self.shape.is_none() {
self.shape.set_default();
}
self.shape.as_mut().unwrap()
}
pub fn take_shape(&mut self) -> super::tensor_shape::TensorShapeProto {
self.shape.take().unwrap_or_else(|| super::tensor_shape::TensorShapeProto::new())
}
pub fn get_dtype(&self) -> super::types::DataType {
self.dtype
}
pub fn clear_dtype(&mut self) {
self.dtype = super::types::DataType::DT_INVALID;
}
pub fn set_dtype(&mut self, v: super::types::DataType) {
self.dtype = v;
}
pub fn get_minimum(&self) -> &super::tensor::TensorProto {
self.minimum.as_ref().unwrap_or_else(|| <super::tensor::TensorProto as ::protobuf::Message>::default_instance())
}
pub fn clear_minimum(&mut self) {
self.minimum.clear();
}
pub fn has_minimum(&self) -> bool {
self.minimum.is_some()
}
pub fn set_minimum(&mut self, v: super::tensor::TensorProto) {
self.minimum = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_minimum(&mut self) -> &mut super::tensor::TensorProto {
if self.minimum.is_none() {
self.minimum.set_default();
}
self.minimum.as_mut().unwrap()
}
pub fn take_minimum(&mut self) -> super::tensor::TensorProto {
self.minimum.take().unwrap_or_else(|| super::tensor::TensorProto::new())
}
pub fn get_maximum(&self) -> &super::tensor::TensorProto {
self.maximum.as_ref().unwrap_or_else(|| <super::tensor::TensorProto as ::protobuf::Message>::default_instance())
}
pub fn clear_maximum(&mut self) {
self.maximum.clear();
}
pub fn has_maximum(&self) -> bool {
self.maximum.is_some()
}
pub fn set_maximum(&mut self, v: super::tensor::TensorProto) {
self.maximum = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_maximum(&mut self) -> &mut super::tensor::TensorProto {
if self.maximum.is_none() {
self.maximum.set_default();
}
self.maximum.as_mut().unwrap()
}
pub fn take_maximum(&mut self) -> super::tensor::TensorProto {
self.maximum.take().unwrap_or_else(|| super::tensor::TensorProto::new())
}
}
impl ::protobuf::Message for BoundedTensorSpecProto {
fn is_initialized(&self) -> bool {
for v in &self.shape {
if !v.is_initialized() {
return false;
}
};
for v in &self.minimum {
if !v.is_initialized() {
return false;
}
};
for v in &self.maximum {
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_message_into(wire_type, is, &mut self.shape)?;
},
3 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.dtype, 3, &mut self.unknown_fields)?
},
4 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.minimum)?;
},
5 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.maximum)?;
},
_ => {
::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 let Some(ref v) = self.shape.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.dtype != super::types::DataType::DT_INVALID {
my_size += ::protobuf::rt::enum_size(3, self.dtype);
}
if let Some(ref v) = self.minimum.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.maximum.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.name.is_empty() {
os.write_string(1, &self.name)?;
}
if let Some(ref v) = self.shape.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 self.dtype != super::types::DataType::DT_INVALID {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.dtype))?;
}
if let Some(ref v) = self.minimum.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.maximum.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)?;
}
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() -> BoundedTensorSpecProto {
BoundedTensorSpecProto::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: &BoundedTensorSpecProto| { &m.name },
|m: &mut BoundedTensorSpecProto| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tensor_shape::TensorShapeProto>>(
"shape",
|m: &BoundedTensorSpecProto| { &m.shape },
|m: &mut BoundedTensorSpecProto| { &mut m.shape },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::types::DataType>>(
"dtype",
|m: &BoundedTensorSpecProto| { &m.dtype },
|m: &mut BoundedTensorSpecProto| { &mut m.dtype },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tensor::TensorProto>>(
"minimum",
|m: &BoundedTensorSpecProto| { &m.minimum },
|m: &mut BoundedTensorSpecProto| { &mut m.minimum },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tensor::TensorProto>>(
"maximum",
|m: &BoundedTensorSpecProto| { &m.maximum },
|m: &mut BoundedTensorSpecProto| { &mut m.maximum },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<BoundedTensorSpecProto>(
"BoundedTensorSpecProto",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static BoundedTensorSpecProto {
static instance: ::protobuf::rt::LazyV2<BoundedTensorSpecProto> = ::protobuf::rt::LazyV2::INIT;
instance.get(BoundedTensorSpecProto::new)
}
}
impl ::protobuf::Clear for BoundedTensorSpecProto {
fn clear(&mut self) {
self.name.clear();
self.shape.clear();
self.dtype = super::types::DataType::DT_INVALID;
self.minimum.clear();
self.maximum.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for BoundedTensorSpecProto {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BoundedTensorSpecProto {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct TypeSpecProto {
pub type_spec_class: TypeSpecProto_TypeSpecClass,
pub type_state: ::protobuf::SingularPtrField<StructuredValue>,
pub type_spec_class_name: ::std::string::String,
pub num_flat_components: i32,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a TypeSpecProto {
fn default() -> &'a TypeSpecProto {
<TypeSpecProto as ::protobuf::Message>::default_instance()
}
}
impl TypeSpecProto {
pub fn new() -> TypeSpecProto {
::std::default::Default::default()
}
pub fn get_type_spec_class(&self) -> TypeSpecProto_TypeSpecClass {
self.type_spec_class
}
pub fn clear_type_spec_class(&mut self) {
self.type_spec_class = TypeSpecProto_TypeSpecClass::UNKNOWN;
}
pub fn set_type_spec_class(&mut self, v: TypeSpecProto_TypeSpecClass) {
self.type_spec_class = v;
}
pub fn get_type_state(&self) -> &StructuredValue {
self.type_state.as_ref().unwrap_or_else(|| <StructuredValue as ::protobuf::Message>::default_instance())
}
pub fn clear_type_state(&mut self) {
self.type_state.clear();
}
pub fn has_type_state(&self) -> bool {
self.type_state.is_some()
}
pub fn set_type_state(&mut self, v: StructuredValue) {
self.type_state = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_type_state(&mut self) -> &mut StructuredValue {
if self.type_state.is_none() {
self.type_state.set_default();
}
self.type_state.as_mut().unwrap()
}
pub fn take_type_state(&mut self) -> StructuredValue {
self.type_state.take().unwrap_or_else(|| StructuredValue::new())
}
pub fn get_type_spec_class_name(&self) -> &str {
&self.type_spec_class_name
}
pub fn clear_type_spec_class_name(&mut self) {
self.type_spec_class_name.clear();
}
pub fn set_type_spec_class_name(&mut self, v: ::std::string::String) {
self.type_spec_class_name = v;
}
pub fn mut_type_spec_class_name(&mut self) -> &mut ::std::string::String {
&mut self.type_spec_class_name
}
pub fn take_type_spec_class_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.type_spec_class_name, ::std::string::String::new())
}
pub fn get_num_flat_components(&self) -> i32 {
self.num_flat_components
}
pub fn clear_num_flat_components(&mut self) {
self.num_flat_components = 0;
}
pub fn set_num_flat_components(&mut self, v: i32) {
self.num_flat_components = v;
}
}
impl ::protobuf::Message for TypeSpecProto {
fn is_initialized(&self) -> bool {
for v in &self.type_state {
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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.type_spec_class, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.type_state)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.type_spec_class_name)?;
},
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.num_flat_components = 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.type_spec_class != TypeSpecProto_TypeSpecClass::UNKNOWN {
my_size += ::protobuf::rt::enum_size(1, self.type_spec_class);
}
if let Some(ref v) = self.type_state.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.type_spec_class_name.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.type_spec_class_name);
}
if self.num_flat_components != 0 {
my_size += ::protobuf::rt::value_size(4, self.num_flat_components, ::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.type_spec_class != TypeSpecProto_TypeSpecClass::UNKNOWN {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.type_spec_class))?;
}
if let Some(ref v) = self.type_state.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 !self.type_spec_class_name.is_empty() {
os.write_string(3, &self.type_spec_class_name)?;
}
if self.num_flat_components != 0 {
os.write_int32(4, self.num_flat_components)?;
}
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() -> TypeSpecProto {
TypeSpecProto::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::ProtobufTypeEnum<TypeSpecProto_TypeSpecClass>>(
"type_spec_class",
|m: &TypeSpecProto| { &m.type_spec_class },
|m: &mut TypeSpecProto| { &mut m.type_spec_class },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<StructuredValue>>(
"type_state",
|m: &TypeSpecProto| { &m.type_state },
|m: &mut TypeSpecProto| { &mut m.type_state },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"type_spec_class_name",
|m: &TypeSpecProto| { &m.type_spec_class_name },
|m: &mut TypeSpecProto| { &mut m.type_spec_class_name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"num_flat_components",
|m: &TypeSpecProto| { &m.num_flat_components },
|m: &mut TypeSpecProto| { &mut m.num_flat_components },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<TypeSpecProto>(
"TypeSpecProto",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static TypeSpecProto {
static instance: ::protobuf::rt::LazyV2<TypeSpecProto> = ::protobuf::rt::LazyV2::INIT;
instance.get(TypeSpecProto::new)
}
}
impl ::protobuf::Clear for TypeSpecProto {
fn clear(&mut self) {
self.type_spec_class = TypeSpecProto_TypeSpecClass::UNKNOWN;
self.type_state.clear();
self.type_spec_class_name.clear();
self.num_flat_components = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for TypeSpecProto {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TypeSpecProto {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum TypeSpecProto_TypeSpecClass {
UNKNOWN = 0,
SPARSE_TENSOR_SPEC = 1,
INDEXED_SLICES_SPEC = 2,
RAGGED_TENSOR_SPEC = 3,
TENSOR_ARRAY_SPEC = 4,
DATA_DATASET_SPEC = 5,
DATA_ITERATOR_SPEC = 6,
OPTIONAL_SPEC = 7,
PER_REPLICA_SPEC = 8,
VARIABLE_SPEC = 9,
ROW_PARTITION_SPEC = 10,
REGISTERED_TYPE_SPEC = 12,
EXTENSION_TYPE_SPEC = 13,
}
impl ::protobuf::ProtobufEnum for TypeSpecProto_TypeSpecClass {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<TypeSpecProto_TypeSpecClass> {
match value {
0 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::UNKNOWN),
1 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::SPARSE_TENSOR_SPEC),
2 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::INDEXED_SLICES_SPEC),
3 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::RAGGED_TENSOR_SPEC),
4 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::TENSOR_ARRAY_SPEC),
5 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::DATA_DATASET_SPEC),
6 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::DATA_ITERATOR_SPEC),
7 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::OPTIONAL_SPEC),
8 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::PER_REPLICA_SPEC),
9 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::VARIABLE_SPEC),
10 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::ROW_PARTITION_SPEC),
12 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::REGISTERED_TYPE_SPEC),
13 => ::std::option::Option::Some(TypeSpecProto_TypeSpecClass::EXTENSION_TYPE_SPEC),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [TypeSpecProto_TypeSpecClass] = &[
TypeSpecProto_TypeSpecClass::UNKNOWN,
TypeSpecProto_TypeSpecClass::SPARSE_TENSOR_SPEC,
TypeSpecProto_TypeSpecClass::INDEXED_SLICES_SPEC,
TypeSpecProto_TypeSpecClass::RAGGED_TENSOR_SPEC,
TypeSpecProto_TypeSpecClass::TENSOR_ARRAY_SPEC,
TypeSpecProto_TypeSpecClass::DATA_DATASET_SPEC,
TypeSpecProto_TypeSpecClass::DATA_ITERATOR_SPEC,
TypeSpecProto_TypeSpecClass::OPTIONAL_SPEC,
TypeSpecProto_TypeSpecClass::PER_REPLICA_SPEC,
TypeSpecProto_TypeSpecClass::VARIABLE_SPEC,
TypeSpecProto_TypeSpecClass::ROW_PARTITION_SPEC,
TypeSpecProto_TypeSpecClass::REGISTERED_TYPE_SPEC,
TypeSpecProto_TypeSpecClass::EXTENSION_TYPE_SPEC,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<TypeSpecProto_TypeSpecClass>("TypeSpecProto.TypeSpecClass", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for TypeSpecProto_TypeSpecClass {
}
impl ::std::default::Default for TypeSpecProto_TypeSpecClass {
fn default() -> Self {
TypeSpecProto_TypeSpecClass::UNKNOWN
}
}
impl ::protobuf::reflect::ProtobufValue for TypeSpecProto_TypeSpecClass {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n%tensorflow/core/protobuf/struct.proto\x12\ntensorflow\x1a&tensorflow/\
core/framework/tensor.proto\x1a,tensorflow/core/framework/tensor_shape.p\
roto\x1a%tensorflow/core/framework/types.proto\"\x9a\x07\n\x0fStructured\
Value\x126\n\nnone_value\x18\x01\x20\x01(\x0b2\x15.tensorflow.NoneValueH\
\0R\tnoneValue\x12%\n\rfloat64_value\x18\x0b\x20\x01(\x01H\0R\x0cfloat64\
Value\x12!\n\x0bint64_value\x18\x0c\x20\x01(\x12H\0R\nint64Value\x12#\n\
\x0cstring_value\x18\r\x20\x01(\tH\0R\x0bstringValue\x12\x1f\n\nbool_val\
ue\x18\x0e\x20\x01(\x08H\0R\tboolValue\x12L\n\x12tensor_shape_value\x18\
\x1f\x20\x01(\x0b2\x1c.tensorflow.TensorShapeProtoH\0R\x10tensorShapeVal\
ue\x12D\n\x12tensor_dtype_value\x18\x20\x20\x01(\x0e2\x14.tensorflow.Dat\
aTypeH\0R\x10tensorDtypeValue\x12I\n\x11tensor_spec_value\x18!\x20\x01(\
\x0b2\x1b.tensorflow.TensorSpecProtoH\0R\x0ftensorSpecValue\x12C\n\x0fty\
pe_spec_value\x18\"\x20\x01(\x0b2\x19.tensorflow.TypeSpecProtoH\0R\rtype\
SpecValue\x12_\n\x19bounded_tensor_spec_value\x18#\x20\x01(\x0b2\".tenso\
rflow.BoundedTensorSpecProtoH\0R\x16boundedTensorSpecValue\x126\n\nlist_\
value\x183\x20\x01(\x0b2\x15.tensorflow.ListValueH\0R\tlistValue\x129\n\
\x0btuple_value\x184\x20\x01(\x0b2\x16.tensorflow.TupleValueH\0R\ntupleV\
alue\x126\n\ndict_value\x185\x20\x01(\x0b2\x15.tensorflow.DictValueH\0R\
\tdictValue\x12I\n\x11named_tuple_value\x186\x20\x01(\x0b2\x1b.tensorflo\
w.NamedTupleValueH\0R\x0fnamedTupleValue\x12<\n\x0ctensor_value\x187\x20\
\x01(\x0b2\x17.tensorflow.TensorProtoH\0R\x0btensorValueB\x06\n\x04kind\
\"\x0b\n\tNoneValue\"@\n\tListValue\x123\n\x06values\x18\x01\x20\x03(\
\x0b2\x1b.tensorflow.StructuredValueR\x06values\"A\n\nTupleValue\x123\n\
\x06values\x18\x01\x20\x03(\x0b2\x1b.tensorflow.StructuredValueR\x06valu\
es\"\x9e\x01\n\tDictValue\x129\n\x06fields\x18\x01\x20\x03(\x0b2!.tensor\
flow.DictValue.FieldsEntryR\x06fields\x1aV\n\x0bFieldsEntry\x12\x10\n\
\x03key\x18\x01\x20\x01(\tR\x03key\x121\n\x05value\x18\x02\x20\x01(\x0b2\
\x1b.tensorflow.StructuredValueR\x05value:\x028\x01\"P\n\tPairValue\x12\
\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x121\n\x05value\x18\x02\x20\x01\
(\x0b2\x1b.tensorflow.StructuredValueR\x05value\"T\n\x0fNamedTupleValue\
\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12-\n\x06values\x18\x02\
\x20\x03(\x0b2\x15.tensorflow.PairValueR\x06values\"\x85\x01\n\x0fTensor\
SpecProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x122\n\x05shape\
\x18\x02\x20\x01(\x0b2\x1c.tensorflow.TensorShapeProtoR\x05shape\x12*\n\
\x05dtype\x18\x03\x20\x01(\x0e2\x14.tensorflow.DataTypeR\x05dtype\"\xf2\
\x01\n\x16BoundedTensorSpecProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\
\x04name\x122\n\x05shape\x18\x02\x20\x01(\x0b2\x1c.tensorflow.TensorShap\
eProtoR\x05shape\x12*\n\x05dtype\x18\x03\x20\x01(\x0e2\x14.tensorflow.Da\
taTypeR\x05dtype\x121\n\x07minimum\x18\x04\x20\x01(\x0b2\x17.tensorflow.\
TensorProtoR\x07minimum\x121\n\x07maximum\x18\x05\x20\x01(\x0b2\x17.tens\
orflow.TensorProtoR\x07maximum\"\xb8\x04\n\rTypeSpecProto\x12O\n\x0ftype\
_spec_class\x18\x01\x20\x01(\x0e2'.tensorflow.TypeSpecProto.TypeSpecClas\
sR\rtypeSpecClass\x12:\n\ntype_state\x18\x02\x20\x01(\x0b2\x1b.tensorflo\
w.StructuredValueR\ttypeState\x12/\n\x14type_spec_class_name\x18\x03\x20\
\x01(\tR\x11typeSpecClassName\x12.\n\x13num_flat_components\x18\x04\x20\
\x01(\x05R\x11numFlatComponents\"\xb8\x02\n\rTypeSpecClass\x12\x0b\n\x07\
UNKNOWN\x10\0\x12\x16\n\x12SPARSE_TENSOR_SPEC\x10\x01\x12\x17\n\x13INDEX\
ED_SLICES_SPEC\x10\x02\x12\x16\n\x12RAGGED_TENSOR_SPEC\x10\x03\x12\x15\n\
\x11TENSOR_ARRAY_SPEC\x10\x04\x12\x15\n\x11DATA_DATASET_SPEC\x10\x05\x12\
\x16\n\x12DATA_ITERATOR_SPEC\x10\x06\x12\x11\n\rOPTIONAL_SPEC\x10\x07\
\x12\x14\n\x10PER_REPLICA_SPEC\x10\x08\x12\x11\n\rVARIABLE_SPEC\x10\t\
\x12\x16\n\x12ROW_PARTITION_SPEC\x10\n\x12\x18\n\x14REGISTERED_TYPE_SPEC\
\x10\x0c\x12\x17\n\x13EXTENSION_TYPE_SPEC\x10\r\"\x04\x08\x0b\x10\x0bBWZ\
Ugithub.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_p\
rotos_go_protob\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()
})
}