#![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 OpDef {
pub name: ::std::string::String,
pub input_arg: ::protobuf::RepeatedField<OpDef_ArgDef>,
pub output_arg: ::protobuf::RepeatedField<OpDef_ArgDef>,
pub control_output: ::protobuf::RepeatedField<::std::string::String>,
pub attr: ::protobuf::RepeatedField<OpDef_AttrDef>,
pub deprecation: ::protobuf::SingularPtrField<OpDeprecation>,
pub summary: ::std::string::String,
pub description: ::std::string::String,
pub is_commutative: bool,
pub is_aggregate: bool,
pub is_stateful: bool,
pub allows_uninitialized_input: bool,
pub is_distributed_communication: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OpDef {
fn default() -> &'a OpDef {
<OpDef as ::protobuf::Message>::default_instance()
}
}
impl OpDef {
pub fn new() -> OpDef {
::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_input_arg(&self) -> &[OpDef_ArgDef] {
&self.input_arg
}
pub fn clear_input_arg(&mut self) {
self.input_arg.clear();
}
pub fn set_input_arg(&mut self, v: ::protobuf::RepeatedField<OpDef_ArgDef>) {
self.input_arg = v;
}
pub fn mut_input_arg(&mut self) -> &mut ::protobuf::RepeatedField<OpDef_ArgDef> {
&mut self.input_arg
}
pub fn take_input_arg(&mut self) -> ::protobuf::RepeatedField<OpDef_ArgDef> {
::std::mem::replace(&mut self.input_arg, ::protobuf::RepeatedField::new())
}
pub fn get_output_arg(&self) -> &[OpDef_ArgDef] {
&self.output_arg
}
pub fn clear_output_arg(&mut self) {
self.output_arg.clear();
}
pub fn set_output_arg(&mut self, v: ::protobuf::RepeatedField<OpDef_ArgDef>) {
self.output_arg = v;
}
pub fn mut_output_arg(&mut self) -> &mut ::protobuf::RepeatedField<OpDef_ArgDef> {
&mut self.output_arg
}
pub fn take_output_arg(&mut self) -> ::protobuf::RepeatedField<OpDef_ArgDef> {
::std::mem::replace(&mut self.output_arg, ::protobuf::RepeatedField::new())
}
pub fn get_control_output(&self) -> &[::std::string::String] {
&self.control_output
}
pub fn clear_control_output(&mut self) {
self.control_output.clear();
}
pub fn set_control_output(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
self.control_output = v;
}
pub fn mut_control_output(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
&mut self.control_output
}
pub fn take_control_output(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
::std::mem::replace(&mut self.control_output, ::protobuf::RepeatedField::new())
}
pub fn get_attr(&self) -> &[OpDef_AttrDef] {
&self.attr
}
pub fn clear_attr(&mut self) {
self.attr.clear();
}
pub fn set_attr(&mut self, v: ::protobuf::RepeatedField<OpDef_AttrDef>) {
self.attr = v;
}
pub fn mut_attr(&mut self) -> &mut ::protobuf::RepeatedField<OpDef_AttrDef> {
&mut self.attr
}
pub fn take_attr(&mut self) -> ::protobuf::RepeatedField<OpDef_AttrDef> {
::std::mem::replace(&mut self.attr, ::protobuf::RepeatedField::new())
}
pub fn get_deprecation(&self) -> &OpDeprecation {
self.deprecation.as_ref().unwrap_or_else(|| <OpDeprecation as ::protobuf::Message>::default_instance())
}
pub fn clear_deprecation(&mut self) {
self.deprecation.clear();
}
pub fn has_deprecation(&self) -> bool {
self.deprecation.is_some()
}
pub fn set_deprecation(&mut self, v: OpDeprecation) {
self.deprecation = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_deprecation(&mut self) -> &mut OpDeprecation {
if self.deprecation.is_none() {
self.deprecation.set_default();
}
self.deprecation.as_mut().unwrap()
}
pub fn take_deprecation(&mut self) -> OpDeprecation {
self.deprecation.take().unwrap_or_else(|| OpDeprecation::new())
}
pub fn get_summary(&self) -> &str {
&self.summary
}
pub fn clear_summary(&mut self) {
self.summary.clear();
}
pub fn set_summary(&mut self, v: ::std::string::String) {
self.summary = v;
}
pub fn mut_summary(&mut self) -> &mut ::std::string::String {
&mut self.summary
}
pub fn take_summary(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.summary, ::std::string::String::new())
}
pub fn get_description(&self) -> &str {
&self.description
}
pub fn clear_description(&mut self) {
self.description.clear();
}
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = v;
}
pub fn mut_description(&mut self) -> &mut ::std::string::String {
&mut self.description
}
pub fn take_description(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.description, ::std::string::String::new())
}
pub fn get_is_commutative(&self) -> bool {
self.is_commutative
}
pub fn clear_is_commutative(&mut self) {
self.is_commutative = false;
}
pub fn set_is_commutative(&mut self, v: bool) {
self.is_commutative = v;
}
pub fn get_is_aggregate(&self) -> bool {
self.is_aggregate
}
pub fn clear_is_aggregate(&mut self) {
self.is_aggregate = false;
}
pub fn set_is_aggregate(&mut self, v: bool) {
self.is_aggregate = v;
}
pub fn get_is_stateful(&self) -> bool {
self.is_stateful
}
pub fn clear_is_stateful(&mut self) {
self.is_stateful = false;
}
pub fn set_is_stateful(&mut self, v: bool) {
self.is_stateful = v;
}
pub fn get_allows_uninitialized_input(&self) -> bool {
self.allows_uninitialized_input
}
pub fn clear_allows_uninitialized_input(&mut self) {
self.allows_uninitialized_input = false;
}
pub fn set_allows_uninitialized_input(&mut self, v: bool) {
self.allows_uninitialized_input = v;
}
pub fn get_is_distributed_communication(&self) -> bool {
self.is_distributed_communication
}
pub fn clear_is_distributed_communication(&mut self) {
self.is_distributed_communication = false;
}
pub fn set_is_distributed_communication(&mut self, v: bool) {
self.is_distributed_communication = v;
}
}
impl ::protobuf::Message for OpDef {
fn is_initialized(&self) -> bool {
for v in &self.input_arg {
if !v.is_initialized() {
return false;
}
};
for v in &self.output_arg {
if !v.is_initialized() {
return false;
}
};
for v in &self.attr {
if !v.is_initialized() {
return false;
}
};
for v in &self.deprecation {
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.input_arg)?;
},
3 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.output_arg)?;
},
20 => {
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.control_output)?;
},
4 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attr)?;
},
8 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.deprecation)?;
},
5 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.summary)?;
},
6 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
},
18 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.is_commutative = tmp;
},
16 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.is_aggregate = tmp;
},
17 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.is_stateful = tmp;
},
19 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.allows_uninitialized_input = tmp;
},
21 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.is_distributed_communication = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
for value in &self.input_arg {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.output_arg {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.control_output {
my_size += ::protobuf::rt::string_size(20, &value);
};
for value in &self.attr {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let Some(ref v) = self.deprecation.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.summary.is_empty() {
my_size += ::protobuf::rt::string_size(5, &self.summary);
}
if !self.description.is_empty() {
my_size += ::protobuf::rt::string_size(6, &self.description);
}
if self.is_commutative != false {
my_size += 3;
}
if self.is_aggregate != false {
my_size += 3;
}
if self.is_stateful != false {
my_size += 3;
}
if self.allows_uninitialized_input != false {
my_size += 3;
}
if self.is_distributed_communication != false {
my_size += 3;
}
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.input_arg {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
for v in &self.output_arg {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
for v in &self.control_output {
os.write_string(20, &v)?;
};
for v in &self.attr {
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.deprecation.as_ref() {
os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.summary.is_empty() {
os.write_string(5, &self.summary)?;
}
if !self.description.is_empty() {
os.write_string(6, &self.description)?;
}
if self.is_commutative != false {
os.write_bool(18, self.is_commutative)?;
}
if self.is_aggregate != false {
os.write_bool(16, self.is_aggregate)?;
}
if self.is_stateful != false {
os.write_bool(17, self.is_stateful)?;
}
if self.allows_uninitialized_input != false {
os.write_bool(19, self.allows_uninitialized_input)?;
}
if self.is_distributed_communication != false {
os.write_bool(21, self.is_distributed_communication)?;
}
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() -> OpDef {
OpDef::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: &OpDef| { &m.name },
|m: &mut OpDef| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<OpDef_ArgDef>>(
"input_arg",
|m: &OpDef| { &m.input_arg },
|m: &mut OpDef| { &mut m.input_arg },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<OpDef_ArgDef>>(
"output_arg",
|m: &OpDef| { &m.output_arg },
|m: &mut OpDef| { &mut m.output_arg },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"control_output",
|m: &OpDef| { &m.control_output },
|m: &mut OpDef| { &mut m.control_output },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<OpDef_AttrDef>>(
"attr",
|m: &OpDef| { &m.attr },
|m: &mut OpDef| { &mut m.attr },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<OpDeprecation>>(
"deprecation",
|m: &OpDef| { &m.deprecation },
|m: &mut OpDef| { &mut m.deprecation },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"summary",
|m: &OpDef| { &m.summary },
|m: &mut OpDef| { &mut m.summary },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"description",
|m: &OpDef| { &m.description },
|m: &mut OpDef| { &mut m.description },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"is_commutative",
|m: &OpDef| { &m.is_commutative },
|m: &mut OpDef| { &mut m.is_commutative },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"is_aggregate",
|m: &OpDef| { &m.is_aggregate },
|m: &mut OpDef| { &mut m.is_aggregate },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"is_stateful",
|m: &OpDef| { &m.is_stateful },
|m: &mut OpDef| { &mut m.is_stateful },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"allows_uninitialized_input",
|m: &OpDef| { &m.allows_uninitialized_input },
|m: &mut OpDef| { &mut m.allows_uninitialized_input },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"is_distributed_communication",
|m: &OpDef| { &m.is_distributed_communication },
|m: &mut OpDef| { &mut m.is_distributed_communication },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<OpDef>(
"OpDef",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static OpDef {
static instance: ::protobuf::rt::LazyV2<OpDef> = ::protobuf::rt::LazyV2::INIT;
instance.get(OpDef::new)
}
}
impl ::protobuf::Clear for OpDef {
fn clear(&mut self) {
self.name.clear();
self.input_arg.clear();
self.output_arg.clear();
self.control_output.clear();
self.attr.clear();
self.deprecation.clear();
self.summary.clear();
self.description.clear();
self.is_commutative = false;
self.is_aggregate = false;
self.is_stateful = false;
self.allows_uninitialized_input = false;
self.is_distributed_communication = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OpDef {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OpDef {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct OpDef_ArgDef {
pub name: ::std::string::String,
pub description: ::std::string::String,
pub field_type: super::types::DataType,
pub type_attr: ::std::string::String,
pub number_attr: ::std::string::String,
pub type_list_attr: ::std::string::String,
pub handle_data: ::protobuf::RepeatedField<super::resource_handle::ResourceHandleProto_DtypeAndShape>,
pub is_ref: bool,
pub experimental_full_type: ::protobuf::SingularPtrField<super::full_type::FullTypeDef>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OpDef_ArgDef {
fn default() -> &'a OpDef_ArgDef {
<OpDef_ArgDef as ::protobuf::Message>::default_instance()
}
}
impl OpDef_ArgDef {
pub fn new() -> OpDef_ArgDef {
::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_description(&self) -> &str {
&self.description
}
pub fn clear_description(&mut self) {
self.description.clear();
}
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = v;
}
pub fn mut_description(&mut self) -> &mut ::std::string::String {
&mut self.description
}
pub fn take_description(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.description, ::std::string::String::new())
}
pub fn get_field_type(&self) -> super::types::DataType {
self.field_type
}
pub fn clear_field_type(&mut self) {
self.field_type = super::types::DataType::DT_INVALID;
}
pub fn set_field_type(&mut self, v: super::types::DataType) {
self.field_type = v;
}
pub fn get_type_attr(&self) -> &str {
&self.type_attr
}
pub fn clear_type_attr(&mut self) {
self.type_attr.clear();
}
pub fn set_type_attr(&mut self, v: ::std::string::String) {
self.type_attr = v;
}
pub fn mut_type_attr(&mut self) -> &mut ::std::string::String {
&mut self.type_attr
}
pub fn take_type_attr(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.type_attr, ::std::string::String::new())
}
pub fn get_number_attr(&self) -> &str {
&self.number_attr
}
pub fn clear_number_attr(&mut self) {
self.number_attr.clear();
}
pub fn set_number_attr(&mut self, v: ::std::string::String) {
self.number_attr = v;
}
pub fn mut_number_attr(&mut self) -> &mut ::std::string::String {
&mut self.number_attr
}
pub fn take_number_attr(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.number_attr, ::std::string::String::new())
}
pub fn get_type_list_attr(&self) -> &str {
&self.type_list_attr
}
pub fn clear_type_list_attr(&mut self) {
self.type_list_attr.clear();
}
pub fn set_type_list_attr(&mut self, v: ::std::string::String) {
self.type_list_attr = v;
}
pub fn mut_type_list_attr(&mut self) -> &mut ::std::string::String {
&mut self.type_list_attr
}
pub fn take_type_list_attr(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.type_list_attr, ::std::string::String::new())
}
pub fn get_handle_data(&self) -> &[super::resource_handle::ResourceHandleProto_DtypeAndShape] {
&self.handle_data
}
pub fn clear_handle_data(&mut self) {
self.handle_data.clear();
}
pub fn set_handle_data(&mut self, v: ::protobuf::RepeatedField<super::resource_handle::ResourceHandleProto_DtypeAndShape>) {
self.handle_data = v;
}
pub fn mut_handle_data(&mut self) -> &mut ::protobuf::RepeatedField<super::resource_handle::ResourceHandleProto_DtypeAndShape> {
&mut self.handle_data
}
pub fn take_handle_data(&mut self) -> ::protobuf::RepeatedField<super::resource_handle::ResourceHandleProto_DtypeAndShape> {
::std::mem::replace(&mut self.handle_data, ::protobuf::RepeatedField::new())
}
pub fn get_is_ref(&self) -> bool {
self.is_ref
}
pub fn clear_is_ref(&mut self) {
self.is_ref = false;
}
pub fn set_is_ref(&mut self, v: bool) {
self.is_ref = v;
}
pub fn get_experimental_full_type(&self) -> &super::full_type::FullTypeDef {
self.experimental_full_type.as_ref().unwrap_or_else(|| <super::full_type::FullTypeDef as ::protobuf::Message>::default_instance())
}
pub fn clear_experimental_full_type(&mut self) {
self.experimental_full_type.clear();
}
pub fn has_experimental_full_type(&self) -> bool {
self.experimental_full_type.is_some()
}
pub fn set_experimental_full_type(&mut self, v: super::full_type::FullTypeDef) {
self.experimental_full_type = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_experimental_full_type(&mut self) -> &mut super::full_type::FullTypeDef {
if self.experimental_full_type.is_none() {
self.experimental_full_type.set_default();
}
self.experimental_full_type.as_mut().unwrap()
}
pub fn take_experimental_full_type(&mut self) -> super::full_type::FullTypeDef {
self.experimental_full_type.take().unwrap_or_else(|| super::full_type::FullTypeDef::new())
}
}
impl ::protobuf::Message for OpDef_ArgDef {
fn is_initialized(&self) -> bool {
for v in &self.handle_data {
if !v.is_initialized() {
return false;
}
};
for v in &self.experimental_full_type {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
},
3 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.type_attr)?;
},
5 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.number_attr)?;
},
6 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.type_list_attr)?;
},
7 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.handle_data)?;
},
16 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.is_ref = tmp;
},
17 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.experimental_full_type)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
if !self.description.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.description);
}
if self.field_type != super::types::DataType::DT_INVALID {
my_size += ::protobuf::rt::enum_size(3, self.field_type);
}
if !self.type_attr.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.type_attr);
}
if !self.number_attr.is_empty() {
my_size += ::protobuf::rt::string_size(5, &self.number_attr);
}
if !self.type_list_attr.is_empty() {
my_size += ::protobuf::rt::string_size(6, &self.type_list_attr);
}
for value in &self.handle_data {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.is_ref != false {
my_size += 3;
}
if let Some(ref v) = self.experimental_full_type.as_ref() {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.name.is_empty() {
os.write_string(1, &self.name)?;
}
if !self.description.is_empty() {
os.write_string(2, &self.description)?;
}
if self.field_type != super::types::DataType::DT_INVALID {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
}
if !self.type_attr.is_empty() {
os.write_string(4, &self.type_attr)?;
}
if !self.number_attr.is_empty() {
os.write_string(5, &self.number_attr)?;
}
if !self.type_list_attr.is_empty() {
os.write_string(6, &self.type_list_attr)?;
}
for v in &self.handle_data {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if self.is_ref != false {
os.write_bool(16, self.is_ref)?;
}
if let Some(ref v) = self.experimental_full_type.as_ref() {
os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> OpDef_ArgDef {
OpDef_ArgDef::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: &OpDef_ArgDef| { &m.name },
|m: &mut OpDef_ArgDef| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"description",
|m: &OpDef_ArgDef| { &m.description },
|m: &mut OpDef_ArgDef| { &mut m.description },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::types::DataType>>(
"type",
|m: &OpDef_ArgDef| { &m.field_type },
|m: &mut OpDef_ArgDef| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"type_attr",
|m: &OpDef_ArgDef| { &m.type_attr },
|m: &mut OpDef_ArgDef| { &mut m.type_attr },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"number_attr",
|m: &OpDef_ArgDef| { &m.number_attr },
|m: &mut OpDef_ArgDef| { &mut m.number_attr },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"type_list_attr",
|m: &OpDef_ArgDef| { &m.type_list_attr },
|m: &mut OpDef_ArgDef| { &mut m.type_list_attr },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::resource_handle::ResourceHandleProto_DtypeAndShape>>(
"handle_data",
|m: &OpDef_ArgDef| { &m.handle_data },
|m: &mut OpDef_ArgDef| { &mut m.handle_data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"is_ref",
|m: &OpDef_ArgDef| { &m.is_ref },
|m: &mut OpDef_ArgDef| { &mut m.is_ref },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::full_type::FullTypeDef>>(
"experimental_full_type",
|m: &OpDef_ArgDef| { &m.experimental_full_type },
|m: &mut OpDef_ArgDef| { &mut m.experimental_full_type },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<OpDef_ArgDef>(
"OpDef.ArgDef",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static OpDef_ArgDef {
static instance: ::protobuf::rt::LazyV2<OpDef_ArgDef> = ::protobuf::rt::LazyV2::INIT;
instance.get(OpDef_ArgDef::new)
}
}
impl ::protobuf::Clear for OpDef_ArgDef {
fn clear(&mut self) {
self.name.clear();
self.description.clear();
self.field_type = super::types::DataType::DT_INVALID;
self.type_attr.clear();
self.number_attr.clear();
self.type_list_attr.clear();
self.handle_data.clear();
self.is_ref = false;
self.experimental_full_type.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OpDef_ArgDef {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OpDef_ArgDef {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct OpDef_AttrDef {
pub name: ::std::string::String,
pub field_type: ::std::string::String,
pub default_value: ::protobuf::SingularPtrField<super::attr_value::AttrValue>,
pub description: ::std::string::String,
pub has_minimum: bool,
pub minimum: i64,
pub allowed_values: ::protobuf::SingularPtrField<super::attr_value::AttrValue>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OpDef_AttrDef {
fn default() -> &'a OpDef_AttrDef {
<OpDef_AttrDef as ::protobuf::Message>::default_instance()
}
}
impl OpDef_AttrDef {
pub fn new() -> OpDef_AttrDef {
::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_field_type(&self) -> &str {
&self.field_type
}
pub fn clear_field_type(&mut self) {
self.field_type.clear();
}
pub fn set_field_type(&mut self, v: ::std::string::String) {
self.field_type = v;
}
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
&mut self.field_type
}
pub fn take_field_type(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
}
pub fn get_default_value(&self) -> &super::attr_value::AttrValue {
self.default_value.as_ref().unwrap_or_else(|| <super::attr_value::AttrValue as ::protobuf::Message>::default_instance())
}
pub fn clear_default_value(&mut self) {
self.default_value.clear();
}
pub fn has_default_value(&self) -> bool {
self.default_value.is_some()
}
pub fn set_default_value(&mut self, v: super::attr_value::AttrValue) {
self.default_value = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_default_value(&mut self) -> &mut super::attr_value::AttrValue {
if self.default_value.is_none() {
self.default_value.set_default();
}
self.default_value.as_mut().unwrap()
}
pub fn take_default_value(&mut self) -> super::attr_value::AttrValue {
self.default_value.take().unwrap_or_else(|| super::attr_value::AttrValue::new())
}
pub fn get_description(&self) -> &str {
&self.description
}
pub fn clear_description(&mut self) {
self.description.clear();
}
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = v;
}
pub fn mut_description(&mut self) -> &mut ::std::string::String {
&mut self.description
}
pub fn take_description(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.description, ::std::string::String::new())
}
pub fn get_has_minimum(&self) -> bool {
self.has_minimum
}
pub fn clear_has_minimum(&mut self) {
self.has_minimum = false;
}
pub fn set_has_minimum(&mut self, v: bool) {
self.has_minimum = v;
}
pub fn get_minimum(&self) -> i64 {
self.minimum
}
pub fn clear_minimum(&mut self) {
self.minimum = 0;
}
pub fn set_minimum(&mut self, v: i64) {
self.minimum = v;
}
pub fn get_allowed_values(&self) -> &super::attr_value::AttrValue {
self.allowed_values.as_ref().unwrap_or_else(|| <super::attr_value::AttrValue as ::protobuf::Message>::default_instance())
}
pub fn clear_allowed_values(&mut self) {
self.allowed_values.clear();
}
pub fn has_allowed_values(&self) -> bool {
self.allowed_values.is_some()
}
pub fn set_allowed_values(&mut self, v: super::attr_value::AttrValue) {
self.allowed_values = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_allowed_values(&mut self) -> &mut super::attr_value::AttrValue {
if self.allowed_values.is_none() {
self.allowed_values.set_default();
}
self.allowed_values.as_mut().unwrap()
}
pub fn take_allowed_values(&mut self) -> super::attr_value::AttrValue {
self.allowed_values.take().unwrap_or_else(|| super::attr_value::AttrValue::new())
}
}
impl ::protobuf::Message for OpDef_AttrDef {
fn is_initialized(&self) -> bool {
for v in &self.default_value {
if !v.is_initialized() {
return false;
}
};
for v in &self.allowed_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_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.default_value)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.has_minimum = tmp;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.minimum = tmp;
},
7 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.allowed_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);
}
if !self.field_type.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.field_type);
}
if let Some(ref v) = self.default_value.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.description.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.description);
}
if self.has_minimum != false {
my_size += 2;
}
if self.minimum != 0 {
my_size += ::protobuf::rt::value_size(6, self.minimum, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.allowed_values.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 !self.field_type.is_empty() {
os.write_string(2, &self.field_type)?;
}
if let Some(ref v) = self.default_value.as_ref() {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.description.is_empty() {
os.write_string(4, &self.description)?;
}
if self.has_minimum != false {
os.write_bool(5, self.has_minimum)?;
}
if self.minimum != 0 {
os.write_int64(6, self.minimum)?;
}
if let Some(ref v) = self.allowed_values.as_ref() {
os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
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() -> OpDef_AttrDef {
OpDef_AttrDef::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: &OpDef_AttrDef| { &m.name },
|m: &mut OpDef_AttrDef| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"type",
|m: &OpDef_AttrDef| { &m.field_type },
|m: &mut OpDef_AttrDef| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
"default_value",
|m: &OpDef_AttrDef| { &m.default_value },
|m: &mut OpDef_AttrDef| { &mut m.default_value },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"description",
|m: &OpDef_AttrDef| { &m.description },
|m: &mut OpDef_AttrDef| { &mut m.description },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"has_minimum",
|m: &OpDef_AttrDef| { &m.has_minimum },
|m: &mut OpDef_AttrDef| { &mut m.has_minimum },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"minimum",
|m: &OpDef_AttrDef| { &m.minimum },
|m: &mut OpDef_AttrDef| { &mut m.minimum },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
"allowed_values",
|m: &OpDef_AttrDef| { &m.allowed_values },
|m: &mut OpDef_AttrDef| { &mut m.allowed_values },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<OpDef_AttrDef>(
"OpDef.AttrDef",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static OpDef_AttrDef {
static instance: ::protobuf::rt::LazyV2<OpDef_AttrDef> = ::protobuf::rt::LazyV2::INIT;
instance.get(OpDef_AttrDef::new)
}
}
impl ::protobuf::Clear for OpDef_AttrDef {
fn clear(&mut self) {
self.name.clear();
self.field_type.clear();
self.default_value.clear();
self.description.clear();
self.has_minimum = false;
self.minimum = 0;
self.allowed_values.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OpDef_AttrDef {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OpDef_AttrDef {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct OpDeprecation {
pub version: i32,
pub explanation: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OpDeprecation {
fn default() -> &'a OpDeprecation {
<OpDeprecation as ::protobuf::Message>::default_instance()
}
}
impl OpDeprecation {
pub fn new() -> OpDeprecation {
::std::default::Default::default()
}
pub fn get_version(&self) -> i32 {
self.version
}
pub fn clear_version(&mut self) {
self.version = 0;
}
pub fn set_version(&mut self, v: i32) {
self.version = v;
}
pub fn get_explanation(&self) -> &str {
&self.explanation
}
pub fn clear_explanation(&mut self) {
self.explanation.clear();
}
pub fn set_explanation(&mut self, v: ::std::string::String) {
self.explanation = v;
}
pub fn mut_explanation(&mut self) -> &mut ::std::string::String {
&mut self.explanation
}
pub fn take_explanation(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.explanation, ::std::string::String::new())
}
}
impl ::protobuf::Message for OpDeprecation {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.version = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.explanation)?;
},
_ => {
::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.version != 0 {
my_size += ::protobuf::rt::value_size(1, self.version, ::protobuf::wire_format::WireTypeVarint);
}
if !self.explanation.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.explanation);
}
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.version != 0 {
os.write_int32(1, self.version)?;
}
if !self.explanation.is_empty() {
os.write_string(2, &self.explanation)?;
}
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() -> OpDeprecation {
OpDeprecation::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"version",
|m: &OpDeprecation| { &m.version },
|m: &mut OpDeprecation| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"explanation",
|m: &OpDeprecation| { &m.explanation },
|m: &mut OpDeprecation| { &mut m.explanation },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<OpDeprecation>(
"OpDeprecation",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static OpDeprecation {
static instance: ::protobuf::rt::LazyV2<OpDeprecation> = ::protobuf::rt::LazyV2::INIT;
instance.get(OpDeprecation::new)
}
}
impl ::protobuf::Clear for OpDeprecation {
fn clear(&mut self) {
self.version = 0;
self.explanation.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OpDeprecation {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OpDeprecation {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct OpList {
pub op: ::protobuf::RepeatedField<OpDef>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a OpList {
fn default() -> &'a OpList {
<OpList as ::protobuf::Message>::default_instance()
}
}
impl OpList {
pub fn new() -> OpList {
::std::default::Default::default()
}
pub fn get_op(&self) -> &[OpDef] {
&self.op
}
pub fn clear_op(&mut self) {
self.op.clear();
}
pub fn set_op(&mut self, v: ::protobuf::RepeatedField<OpDef>) {
self.op = v;
}
pub fn mut_op(&mut self) -> &mut ::protobuf::RepeatedField<OpDef> {
&mut self.op
}
pub fn take_op(&mut self) -> ::protobuf::RepeatedField<OpDef> {
::std::mem::replace(&mut self.op, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for OpList {
fn is_initialized(&self) -> bool {
for v in &self.op {
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.op)?;
},
_ => {
::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.op {
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.op {
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() -> OpList {
OpList::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<OpDef>>(
"op",
|m: &OpList| { &m.op },
|m: &mut OpList| { &mut m.op },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<OpList>(
"OpList",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static OpList {
static instance: ::protobuf::rt::LazyV2<OpList> = ::protobuf::rt::LazyV2::INIT;
instance.get(OpList::new)
}
}
impl ::protobuf::Clear for OpList {
fn clear(&mut self) {
self.op.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for OpList {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for OpList {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n&tensorflow/core/framework/op_def.proto\x12\ntensorflow\x1a*tensorflow\
/core/framework/attr_value.proto\x1a)tensorflow/core/framework/full_type\
.proto\x1a/tensorflow/core/framework/resource_handle.proto\x1a%tensorflo\
w/core/framework/types.proto\"\xd5\t\n\x05OpDef\x12\x12\n\x04name\x18\
\x01\x20\x01(\tR\x04name\x125\n\tinput_arg\x18\x02\x20\x03(\x0b2\x18.ten\
sorflow.OpDef.ArgDefR\x08inputArg\x127\n\noutput_arg\x18\x03\x20\x03(\
\x0b2\x18.tensorflow.OpDef.ArgDefR\toutputArg\x12%\n\x0econtrol_output\
\x18\x14\x20\x03(\tR\rcontrolOutput\x12-\n\x04attr\x18\x04\x20\x03(\x0b2\
\x19.tensorflow.OpDef.AttrDefR\x04attr\x12;\n\x0bdeprecation\x18\x08\x20\
\x01(\x0b2\x19.tensorflow.OpDeprecationR\x0bdeprecation\x12\x18\n\x07sum\
mary\x18\x05\x20\x01(\tR\x07summary\x12\x20\n\x0bdescription\x18\x06\x20\
\x01(\tR\x0bdescription\x12%\n\x0eis_commutative\x18\x12\x20\x01(\x08R\r\
isCommutative\x12!\n\x0cis_aggregate\x18\x10\x20\x01(\x08R\x0bisAggregat\
e\x12\x1f\n\x0bis_stateful\x18\x11\x20\x01(\x08R\nisStateful\x12<\n\x1aa\
llows_uninitialized_input\x18\x13\x20\x01(\x08R\x18allowsUninitializedIn\
put\x12@\n\x1cis_distributed_communication\x18\x15\x20\x01(\x08R\x1aisDi\
stributedCommunication\x1a\x82\x03\n\x06ArgDef\x12\x12\n\x04name\x18\x01\
\x20\x01(\tR\x04name\x12\x20\n\x0bdescription\x18\x02\x20\x01(\tR\x0bdes\
cription\x12(\n\x04type\x18\x03\x20\x01(\x0e2\x14.tensorflow.DataTypeR\
\x04type\x12\x1b\n\ttype_attr\x18\x04\x20\x01(\tR\x08typeAttr\x12\x1f\n\
\x0bnumber_attr\x18\x05\x20\x01(\tR\nnumberAttr\x12$\n\x0etype_list_attr\
\x18\x06\x20\x01(\tR\x0ctypeListAttr\x12N\n\x0bhandle_data\x18\x07\x20\
\x03(\x0b2-.tensorflow.ResourceHandleProto.DtypeAndShapeR\nhandleData\
\x12\x15\n\x06is_ref\x18\x10\x20\x01(\x08R\x05isRef\x12M\n\x16experiment\
al_full_type\x18\x11\x20\x01(\x0b2\x17.tensorflow.FullTypeDefR\x14experi\
mentalFullType\x1a\x88\x02\n\x07AttrDef\x12\x12\n\x04name\x18\x01\x20\
\x01(\tR\x04name\x12\x12\n\x04type\x18\x02\x20\x01(\tR\x04type\x12:\n\rd\
efault_value\x18\x03\x20\x01(\x0b2\x15.tensorflow.AttrValueR\x0cdefaultV\
alue\x12\x20\n\x0bdescription\x18\x04\x20\x01(\tR\x0bdescription\x12\x1f\
\n\x0bhas_minimum\x18\x05\x20\x01(\x08R\nhasMinimum\x12\x18\n\x07minimum\
\x18\x06\x20\x01(\x03R\x07minimum\x12<\n\x0eallowed_values\x18\x07\x20\
\x01(\x0b2\x15.tensorflow.AttrValueR\rallowedValues\"K\n\rOpDeprecation\
\x12\x18\n\x07version\x18\x01\x20\x01(\x05R\x07version\x12\x20\n\x0bexpl\
anation\x18\x02\x20\x01(\tR\x0bexplanation\"+\n\x06OpList\x12!\n\x02op\
\x18\x01\x20\x03(\x0b2\x11.tensorflow.OpDefR\x02opB{\n\x18org.tensorflow\
.frameworkB\x0bOpDefProtosP\x01ZMgithub.com/tensorflow/tensorflow/tensor\
flow/go/core/framework/op_def_go_proto\xf8\x01\x01b\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()
})
}