#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct AttrValue {
pub value: ::std::option::Option<attr_value::Value>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a AttrValue {
fn default() -> &'a AttrValue {
<AttrValue as ::protobuf::Message>::default_instance()
}
}
impl AttrValue {
pub fn new() -> AttrValue {
::std::default::Default::default()
}
pub fn s(&self) -> &[u8] {
match self.value {
::std::option::Option::Some(attr_value::Value::S(ref v)) => v,
_ => &[],
}
}
pub fn clear_s(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_s(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::S(..)) => true,
_ => false,
}
}
pub fn set_s(&mut self, v: ::std::vec::Vec<u8>) {
self.value = ::std::option::Option::Some(attr_value::Value::S(v))
}
pub fn mut_s(&mut self) -> &mut ::std::vec::Vec<u8> {
if let ::std::option::Option::Some(attr_value::Value::S(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::S(::std::vec::Vec::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::S(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_s(&mut self) -> ::std::vec::Vec<u8> {
if self.has_s() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::S(v)) => v,
_ => panic!(),
}
} else {
::std::vec::Vec::new()
}
}
pub fn i(&self) -> i64 {
match self.value {
::std::option::Option::Some(attr_value::Value::I(v)) => v,
_ => 0,
}
}
pub fn clear_i(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_i(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::I(..)) => true,
_ => false,
}
}
pub fn set_i(&mut self, v: i64) {
self.value = ::std::option::Option::Some(attr_value::Value::I(v))
}
pub fn f(&self) -> f32 {
match self.value {
::std::option::Option::Some(attr_value::Value::F(v)) => v,
_ => 0.,
}
}
pub fn clear_f(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_f(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::F(..)) => true,
_ => false,
}
}
pub fn set_f(&mut self, v: f32) {
self.value = ::std::option::Option::Some(attr_value::Value::F(v))
}
pub fn b(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::B(v)) => v,
_ => false,
}
}
pub fn clear_b(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_b(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::B(..)) => true,
_ => false,
}
}
pub fn set_b(&mut self, v: bool) {
self.value = ::std::option::Option::Some(attr_value::Value::B(v))
}
pub fn type_(&self) -> super::types::DataType {
match self.value {
::std::option::Option::Some(attr_value::Value::Type(v)) => ::protobuf::EnumOrUnknown::enum_value_or_default(&v),
_ => super::types::DataType::DT_INVALID,
}
}
pub fn clear_type_(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_type(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::Type(..)) => true,
_ => false,
}
}
pub fn set_type(&mut self, v: super::types::DataType) {
self.value = ::std::option::Option::Some(attr_value::Value::Type(::protobuf::EnumOrUnknown::new(v)))
}
pub fn shape(&self) -> &super::tensor_shape::TensorShapeProto {
match self.value {
::std::option::Option::Some(attr_value::Value::Shape(ref v)) => v,
_ => <super::tensor_shape::TensorShapeProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_shape(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_shape(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::Shape(..)) => true,
_ => false,
}
}
pub fn set_shape(&mut self, v: super::tensor_shape::TensorShapeProto) {
self.value = ::std::option::Option::Some(attr_value::Value::Shape(v))
}
pub fn mut_shape(&mut self) -> &mut super::tensor_shape::TensorShapeProto {
if let ::std::option::Option::Some(attr_value::Value::Shape(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::Shape(super::tensor_shape::TensorShapeProto::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::Shape(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_shape(&mut self) -> super::tensor_shape::TensorShapeProto {
if self.has_shape() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::Shape(v)) => v,
_ => panic!(),
}
} else {
super::tensor_shape::TensorShapeProto::new()
}
}
pub fn tensor(&self) -> &super::tensor::TensorProto {
match self.value {
::std::option::Option::Some(attr_value::Value::Tensor(ref v)) => v,
_ => <super::tensor::TensorProto as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_tensor(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_tensor(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::Tensor(..)) => true,
_ => false,
}
}
pub fn set_tensor(&mut self, v: super::tensor::TensorProto) {
self.value = ::std::option::Option::Some(attr_value::Value::Tensor(v))
}
pub fn mut_tensor(&mut self) -> &mut super::tensor::TensorProto {
if let ::std::option::Option::Some(attr_value::Value::Tensor(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::Tensor(super::tensor::TensorProto::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::Tensor(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_tensor(&mut self) -> super::tensor::TensorProto {
if self.has_tensor() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::Tensor(v)) => v,
_ => panic!(),
}
} else {
super::tensor::TensorProto::new()
}
}
pub fn list(&self) -> &attr_value::ListValue {
match self.value {
::std::option::Option::Some(attr_value::Value::List(ref v)) => v,
_ => <attr_value::ListValue as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_list(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_list(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::List(..)) => true,
_ => false,
}
}
pub fn set_list(&mut self, v: attr_value::ListValue) {
self.value = ::std::option::Option::Some(attr_value::Value::List(v))
}
pub fn mut_list(&mut self) -> &mut attr_value::ListValue {
if let ::std::option::Option::Some(attr_value::Value::List(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::List(attr_value::ListValue::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::List(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_list(&mut self) -> attr_value::ListValue {
if self.has_list() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::List(v)) => v,
_ => panic!(),
}
} else {
attr_value::ListValue::new()
}
}
pub fn func(&self) -> &NameAttrList {
match self.value {
::std::option::Option::Some(attr_value::Value::Func(ref v)) => v,
_ => <NameAttrList as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_func(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_func(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::Func(..)) => true,
_ => false,
}
}
pub fn set_func(&mut self, v: NameAttrList) {
self.value = ::std::option::Option::Some(attr_value::Value::Func(v))
}
pub fn mut_func(&mut self) -> &mut NameAttrList {
if let ::std::option::Option::Some(attr_value::Value::Func(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::Func(NameAttrList::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::Func(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_func(&mut self) -> NameAttrList {
if self.has_func() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::Func(v)) => v,
_ => panic!(),
}
} else {
NameAttrList::new()
}
}
pub fn placeholder(&self) -> &str {
match self.value {
::std::option::Option::Some(attr_value::Value::Placeholder(ref v)) => v,
_ => "",
}
}
pub fn clear_placeholder(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_placeholder(&self) -> bool {
match self.value {
::std::option::Option::Some(attr_value::Value::Placeholder(..)) => true,
_ => false,
}
}
pub fn set_placeholder(&mut self, v: ::std::string::String) {
self.value = ::std::option::Option::Some(attr_value::Value::Placeholder(v))
}
pub fn mut_placeholder(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(attr_value::Value::Placeholder(_)) = self.value {
} else {
self.value = ::std::option::Option::Some(attr_value::Value::Placeholder(::std::string::String::new()));
}
match self.value {
::std::option::Option::Some(attr_value::Value::Placeholder(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_placeholder(&mut self) -> ::std::string::String {
if self.has_placeholder() {
match self.value.take() {
::std::option::Option::Some(attr_value::Value::Placeholder(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(10);
let mut oneofs = ::std::vec::Vec::with_capacity(1);
fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
"s",
AttrValue::has_s,
AttrValue::s,
AttrValue::set_s,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>(
"i",
AttrValue::has_i,
AttrValue::i,
AttrValue::set_i,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>(
"f",
AttrValue::has_f,
AttrValue::f,
AttrValue::set_f,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>(
"b",
AttrValue::has_b,
AttrValue::b,
AttrValue::set_b,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_enum_accessors::<_, _>(
"type",
|message: &AttrValue| match &message.value {
::std::option::Option::Some(attr_value::Value::Type(e)) => ::std::option::Option::Some(*e),
_ => ::std::option::Option::None,
},
|message: &mut AttrValue, e: ::protobuf::EnumOrUnknown<super::types::DataType>| {
message.value = ::std::option::Option::Some(attr_value::Value::Type(e));
},
super::types::DataType::DT_INVALID,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::tensor_shape::TensorShapeProto>(
"shape",
AttrValue::has_shape,
AttrValue::shape,
AttrValue::mut_shape,
AttrValue::set_shape,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::tensor::TensorProto>(
"tensor",
AttrValue::has_tensor,
AttrValue::tensor,
AttrValue::mut_tensor,
AttrValue::set_tensor,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, attr_value::ListValue>(
"list",
AttrValue::has_list,
AttrValue::list,
AttrValue::mut_list,
AttrValue::set_list,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NameAttrList>(
"func",
AttrValue::has_func,
AttrValue::func,
AttrValue::mut_func,
AttrValue::set_func,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
"placeholder",
AttrValue::has_placeholder,
AttrValue::placeholder,
AttrValue::set_placeholder,
));
oneofs.push(attr_value::Value::generated_oneof_descriptor_data());
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<AttrValue>(
"AttrValue",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for AttrValue {
const NAME: &'static str = "AttrValue";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
18 => {
self.value = ::std::option::Option::Some(attr_value::Value::S(is.read_bytes()?));
},
24 => {
self.value = ::std::option::Option::Some(attr_value::Value::I(is.read_int64()?));
},
37 => {
self.value = ::std::option::Option::Some(attr_value::Value::F(is.read_float()?));
},
40 => {
self.value = ::std::option::Option::Some(attr_value::Value::B(is.read_bool()?));
},
48 => {
self.value = ::std::option::Option::Some(attr_value::Value::Type(is.read_enum_or_unknown()?));
},
58 => {
self.value = ::std::option::Option::Some(attr_value::Value::Shape(is.read_message()?));
},
66 => {
self.value = ::std::option::Option::Some(attr_value::Value::Tensor(is.read_message()?));
},
10 => {
self.value = ::std::option::Option::Some(attr_value::Value::List(is.read_message()?));
},
82 => {
self.value = ::std::option::Option::Some(attr_value::Value::Func(is.read_message()?));
},
74 => {
self.value = ::std::option::Option::Some(attr_value::Value::Placeholder(is.read_string()?));
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let ::std::option::Option::Some(ref v) = self.value {
match v {
&attr_value::Value::S(ref v) => {
my_size += ::protobuf::rt::bytes_size(2, &v);
},
&attr_value::Value::I(v) => {
my_size += ::protobuf::rt::int64_size(3, v);
},
&attr_value::Value::F(v) => {
my_size += 1 + 4;
},
&attr_value::Value::B(v) => {
my_size += 1 + 1;
},
&attr_value::Value::Type(v) => {
my_size += ::protobuf::rt::int32_size(6, v.value());
},
&attr_value::Value::Shape(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
&attr_value::Value::Tensor(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
&attr_value::Value::List(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
&attr_value::Value::Func(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
&attr_value::Value::Placeholder(ref v) => {
my_size += ::protobuf::rt::string_size(9, &v);
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let ::std::option::Option::Some(ref v) = self.value {
match v {
&attr_value::Value::S(ref v) => {
os.write_bytes(2, v)?;
},
&attr_value::Value::I(v) => {
os.write_int64(3, v)?;
},
&attr_value::Value::F(v) => {
os.write_float(4, v)?;
},
&attr_value::Value::B(v) => {
os.write_bool(5, v)?;
},
&attr_value::Value::Type(v) => {
os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?;
},
&attr_value::Value::Shape(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
},
&attr_value::Value::Tensor(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
},
&attr_value::Value::List(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
},
&attr_value::Value::Func(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(10, v, os)?;
},
&attr_value::Value::Placeholder(ref v) => {
os.write_string(9, v)?;
},
};
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> AttrValue {
AttrValue::new()
}
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.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static AttrValue {
static instance: AttrValue = AttrValue {
value: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for AttrValue {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("AttrValue").unwrap()).clone()
}
}
impl ::std::fmt::Display for AttrValue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AttrValue {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod attr_value {
#[derive(Clone,PartialEq,Debug)]
#[non_exhaustive]
pub enum Value {
S(::std::vec::Vec<u8>),
I(i64),
F(f32),
B(bool),
Type(::protobuf::EnumOrUnknown<super::super::types::DataType>),
Shape(super::super::tensor_shape::TensorShapeProto),
Tensor(super::super::tensor::TensorProto),
List(ListValue),
Func(super::NameAttrList),
Placeholder(::std::string::String),
}
impl ::protobuf::Oneof for Value {
}
impl ::protobuf::OneofFull for Value {
fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| <super::AttrValue as ::protobuf::MessageFull>::descriptor().oneof_by_name("value").unwrap()).clone()
}
}
impl Value {
pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
::protobuf::reflect::GeneratedOneofDescriptorData::new::<Value>("value")
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ListValue {
pub s: ::std::vec::Vec<::std::vec::Vec<u8>>,
pub i: ::std::vec::Vec<i64>,
pub f: ::std::vec::Vec<f32>,
pub b: ::std::vec::Vec<bool>,
pub type_: ::std::vec::Vec<::protobuf::EnumOrUnknown<super::super::types::DataType>>,
pub shape: ::std::vec::Vec<super::super::tensor_shape::TensorShapeProto>,
pub tensor: ::std::vec::Vec<super::super::tensor::TensorProto>,
pub func: ::std::vec::Vec<super::NameAttrList>,
pub special_fields: ::protobuf::SpecialFields,
}
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(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(8);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"s",
|m: &ListValue| { &m.s },
|m: &mut ListValue| { &mut m.s },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"i",
|m: &ListValue| { &m.i },
|m: &mut ListValue| { &mut m.i },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"f",
|m: &ListValue| { &m.f },
|m: &mut ListValue| { &mut m.f },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"b",
|m: &ListValue| { &m.b },
|m: &mut ListValue| { &mut m.b },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"type",
|m: &ListValue| { &m.type_ },
|m: &mut ListValue| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"shape",
|m: &ListValue| { &m.shape },
|m: &mut ListValue| { &mut m.shape },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"tensor",
|m: &ListValue| { &m.tensor },
|m: &mut ListValue| { &mut m.tensor },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"func",
|m: &ListValue| { &m.func },
|m: &mut ListValue| { &mut m.func },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ListValue>(
"AttrValue.ListValue",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for ListValue {
const NAME: &'static str = "ListValue";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
18 => {
self.s.push(is.read_bytes()?);
},
26 => {
is.read_repeated_packed_int64_into(&mut self.i)?;
},
24 => {
self.i.push(is.read_int64()?);
},
34 => {
is.read_repeated_packed_float_into(&mut self.f)?;
},
37 => {
self.f.push(is.read_float()?);
},
42 => {
is.read_repeated_packed_bool_into(&mut self.b)?;
},
40 => {
self.b.push(is.read_bool()?);
},
48 => {
self.type_.push(is.read_enum_or_unknown()?);
},
50 => {
::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.type_)?
},
58 => {
self.shape.push(is.read_message()?);
},
66 => {
self.tensor.push(is.read_message()?);
},
74 => {
self.func.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.s {
my_size += ::protobuf::rt::bytes_size(2, &value);
};
my_size += ::protobuf::rt::vec_packed_int64_size(3, &self.i);
my_size += ::protobuf::rt::vec_packed_float_size(4, &self.f);
my_size += ::protobuf::rt::vec_packed_bool_size(5, &self.b);
my_size += ::protobuf::rt::vec_packed_enum_or_unknown_size(6, &self.type_);
for value in &self.shape {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
for value in &self.tensor {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
for value in &self.func {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.s {
os.write_bytes(2, &v)?;
};
os.write_repeated_packed_int64(3, &self.i)?;
os.write_repeated_packed_float(4, &self.f)?;
os.write_repeated_packed_bool(5, &self.b)?;
os.write_repeated_packed_enum_or_unknown(6, &self.type_)?;
for v in &self.shape {
::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
};
for v in &self.tensor {
::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
};
for v in &self.func {
::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> ListValue {
ListValue::new()
}
fn clear(&mut self) {
self.s.clear();
self.i.clear();
self.f.clear();
self.b.clear();
self.type_.clear();
self.shape.clear();
self.tensor.clear();
self.func.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static ListValue {
static instance: ListValue = ListValue {
s: ::std::vec::Vec::new(),
i: ::std::vec::Vec::new(),
f: ::std::vec::Vec::new(),
b: ::std::vec::Vec::new(),
type_: ::std::vec::Vec::new(),
shape: ::std::vec::Vec::new(),
tensor: ::std::vec::Vec::new(),
func: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for ListValue {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("AttrValue.ListValue").unwrap()).clone()
}
}
impl ::std::fmt::Display 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 {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NameAttrList {
pub name: ::std::string::String,
pub attr: ::std::collections::HashMap<::std::string::String, AttrValue>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NameAttrList {
fn default() -> &'a NameAttrList {
<NameAttrList as ::protobuf::Message>::default_instance()
}
}
impl NameAttrList {
pub fn new() -> NameAttrList {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &NameAttrList| { &m.name },
|m: &mut NameAttrList| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>(
"attr",
|m: &NameAttrList| { &m.attr },
|m: &mut NameAttrList| { &mut m.attr },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NameAttrList>(
"NameAttrList",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NameAttrList {
const NAME: &'static str = "NameAttrList";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.name = is.read_string()?;
},
18 => {
let len = is.read_raw_varint32()?;
let old_limit = is.push_limit(len as u64)?;
let mut key = ::std::default::Default::default();
let mut value = ::std::default::Default::default();
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => key = is.read_string()?,
18 => value = is.read_message()?,
_ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
};
}
is.pop_limit(old_limit);
self.attr.insert(key, value);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
for (k, v) in &self.attr {
let mut entry_size = 0;
entry_size += ::protobuf::rt::string_size(1, &k);
let len = v.compute_size();
entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.name.is_empty() {
os.write_string(1, &self.name)?;
}
for (k, v) in &self.attr {
let mut entry_size = 0;
entry_size += ::protobuf::rt::string_size(1, &k);
let len = v.cached_size() as u64;
entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
os.write_raw_varint32(18)?; os.write_raw_varint32(entry_size as u32)?;
os.write_string(1, &k)?;
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NameAttrList {
NameAttrList::new()
}
fn clear(&mut self) {
self.name.clear();
self.attr.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NameAttrList {
static instance: ::protobuf::rt::Lazy<NameAttrList> = ::protobuf::rt::Lazy::new();
instance.get(NameAttrList::new)
}
}
impl ::protobuf::MessageFull for NameAttrList {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NameAttrList").unwrap()).clone()
}
}
impl ::std::fmt::Display for NameAttrList {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NameAttrList {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n*tensorflow/core/framework/attr_value.proto\x12\ntensorflow\x1a&tensor\
flow/core/framework/tensor.proto\x1a,tensorflow/core/framework/tensor_sh\
ape.proto\x1a%tensorflow/core/framework/types.proto\"\x87\x05\n\tAttrVal\
ue\x12\x0e\n\x01s\x18\x02\x20\x01(\x0cH\0R\x01s\x12\x0e\n\x01i\x18\x03\
\x20\x01(\x03H\0R\x01i\x12\x0e\n\x01f\x18\x04\x20\x01(\x02H\0R\x01f\x12\
\x0e\n\x01b\x18\x05\x20\x01(\x08H\0R\x01b\x12*\n\x04type\x18\x06\x20\x01\
(\x0e2\x14.tensorflow.DataTypeH\0R\x04type\x124\n\x05shape\x18\x07\x20\
\x01(\x0b2\x1c.tensorflow.TensorShapeProtoH\0R\x05shape\x121\n\x06tensor\
\x18\x08\x20\x01(\x0b2\x17.tensorflow.TensorProtoH\0R\x06tensor\x125\n\
\x04list\x18\x01\x20\x01(\x0b2\x1f.tensorflow.AttrValue.ListValueH\0R\
\x04list\x12.\n\x04func\x18\n\x20\x01(\x0b2\x18.tensorflow.NameAttrListH\
\0R\x04func\x12\"\n\x0bplaceholder\x18\t\x20\x01(\tH\0R\x0bplaceholder\
\x1a\x90\x02\n\tListValue\x12\x0c\n\x01s\x18\x02\x20\x03(\x0cR\x01s\x12\
\x10\n\x01i\x18\x03\x20\x03(\x03R\x01iB\x02\x10\x01\x12\x10\n\x01f\x18\
\x04\x20\x03(\x02R\x01fB\x02\x10\x01\x12\x10\n\x01b\x18\x05\x20\x03(\x08\
R\x01bB\x02\x10\x01\x12,\n\x04type\x18\x06\x20\x03(\x0e2\x14.tensorflow.\
DataTypeR\x04typeB\x02\x10\x01\x122\n\x05shape\x18\x07\x20\x03(\x0b2\x1c\
.tensorflow.TensorShapeProtoR\x05shape\x12/\n\x06tensor\x18\x08\x20\x03(\
\x0b2\x17.tensorflow.TensorProtoR\x06tensor\x12,\n\x04func\x18\t\x20\x03\
(\x0b2\x18.tensorflow.NameAttrListR\x04funcB\x07\n\x05value\"\xaa\x01\n\
\x0cNameAttrList\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x126\n\
\x04attr\x18\x02\x20\x03(\x0b2\".tensorflow.NameAttrList.AttrEntryR\x04a\
ttr\x1aN\n\tAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12+\n\
\x05value\x18\x02\x20\x01(\x0b2\x15.tensorflow.AttrValueR\x05value:\x028\
\x01B\x83\x01\n\x18org.tensorflow.frameworkB\x0fAttrValueProtosP\x01ZQgi\
thub.com/tensorflow/tensorflow/tensorflow/go/core/framework/attr_value_g\
o_proto\xf8\x01\x01b\x06proto3\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(3);
deps.push(super::tensor::file_descriptor().clone());
deps.push(super::tensor_shape::file_descriptor().clone());
deps.push(super::types::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(3);
messages.push(AttrValue::generated_message_descriptor_data());
messages.push(NameAttrList::generated_message_descriptor_data());
messages.push(attr_value::ListValue::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}