#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![rustfmt::skip]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct SnapshotRecord {
pub tensor: ::protobuf::RepeatedField<super::tensor::TensorProto>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a SnapshotRecord {
fn default() -> &'a SnapshotRecord {
<SnapshotRecord as ::protobuf::Message>::default_instance()
}
}
impl SnapshotRecord {
pub fn new() -> SnapshotRecord {
::std::default::Default::default()
}
pub fn get_tensor(&self) -> &[super::tensor::TensorProto] {
&self.tensor
}
pub fn clear_tensor(&mut self) {
self.tensor.clear();
}
pub fn set_tensor(&mut self, v: ::protobuf::RepeatedField<super::tensor::TensorProto>) {
self.tensor = v;
}
pub fn mut_tensor(&mut self) -> &mut ::protobuf::RepeatedField<super::tensor::TensorProto> {
&mut self.tensor
}
pub fn take_tensor(&mut self) -> ::protobuf::RepeatedField<super::tensor::TensorProto> {
::std::mem::replace(&mut self.tensor, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for SnapshotRecord {
fn is_initialized(&self) -> bool {
for v in &self.tensor {
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.tensor)?;
},
_ => {
::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.tensor {
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.tensor {
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() -> SnapshotRecord {
SnapshotRecord::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<super::tensor::TensorProto>>(
"tensor",
|m: &SnapshotRecord| { &m.tensor },
|m: &mut SnapshotRecord| { &mut m.tensor },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<SnapshotRecord>(
"SnapshotRecord",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static SnapshotRecord {
static instance: ::protobuf::rt::LazyV2<SnapshotRecord> = ::protobuf::rt::LazyV2::INIT;
instance.get(SnapshotRecord::new)
}
}
impl ::protobuf::Clear for SnapshotRecord {
fn clear(&mut self) {
self.tensor.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for SnapshotRecord {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SnapshotRecord {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct SnapshotMetadataRecord {
pub graph_hash: ::std::string::String,
pub run_id: ::std::string::String,
pub creation_timestamp: i64,
pub finalized: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a SnapshotMetadataRecord {
fn default() -> &'a SnapshotMetadataRecord {
<SnapshotMetadataRecord as ::protobuf::Message>::default_instance()
}
}
impl SnapshotMetadataRecord {
pub fn new() -> SnapshotMetadataRecord {
::std::default::Default::default()
}
pub fn get_graph_hash(&self) -> &str {
&self.graph_hash
}
pub fn clear_graph_hash(&mut self) {
self.graph_hash.clear();
}
pub fn set_graph_hash(&mut self, v: ::std::string::String) {
self.graph_hash = v;
}
pub fn mut_graph_hash(&mut self) -> &mut ::std::string::String {
&mut self.graph_hash
}
pub fn take_graph_hash(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.graph_hash, ::std::string::String::new())
}
pub fn get_run_id(&self) -> &str {
&self.run_id
}
pub fn clear_run_id(&mut self) {
self.run_id.clear();
}
pub fn set_run_id(&mut self, v: ::std::string::String) {
self.run_id = v;
}
pub fn mut_run_id(&mut self) -> &mut ::std::string::String {
&mut self.run_id
}
pub fn take_run_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.run_id, ::std::string::String::new())
}
pub fn get_creation_timestamp(&self) -> i64 {
self.creation_timestamp
}
pub fn clear_creation_timestamp(&mut self) {
self.creation_timestamp = 0;
}
pub fn set_creation_timestamp(&mut self, v: i64) {
self.creation_timestamp = v;
}
pub fn get_finalized(&self) -> bool {
self.finalized
}
pub fn clear_finalized(&mut self) {
self.finalized = false;
}
pub fn set_finalized(&mut self, v: bool) {
self.finalized = v;
}
}
impl ::protobuf::Message for SnapshotMetadataRecord {
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_singular_proto3_string_into(wire_type, is, &mut self.graph_hash)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.run_id)?;
},
3 => {
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.creation_timestamp = tmp;
},
1000 => {
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.finalized = 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.graph_hash.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.graph_hash);
}
if !self.run_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.run_id);
}
if self.creation_timestamp != 0 {
my_size += ::protobuf::rt::value_size(3, self.creation_timestamp, ::protobuf::wire_format::WireTypeVarint);
}
if self.finalized != 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.graph_hash.is_empty() {
os.write_string(1, &self.graph_hash)?;
}
if !self.run_id.is_empty() {
os.write_string(2, &self.run_id)?;
}
if self.creation_timestamp != 0 {
os.write_int64(3, self.creation_timestamp)?;
}
if self.finalized != false {
os.write_bool(1000, self.finalized)?;
}
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() -> SnapshotMetadataRecord {
SnapshotMetadataRecord::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>(
"graph_hash",
|m: &SnapshotMetadataRecord| { &m.graph_hash },
|m: &mut SnapshotMetadataRecord| { &mut m.graph_hash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"run_id",
|m: &SnapshotMetadataRecord| { &m.run_id },
|m: &mut SnapshotMetadataRecord| { &mut m.run_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"creation_timestamp",
|m: &SnapshotMetadataRecord| { &m.creation_timestamp },
|m: &mut SnapshotMetadataRecord| { &mut m.creation_timestamp },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"finalized",
|m: &SnapshotMetadataRecord| { &m.finalized },
|m: &mut SnapshotMetadataRecord| { &mut m.finalized },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<SnapshotMetadataRecord>(
"SnapshotMetadataRecord",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static SnapshotMetadataRecord {
static instance: ::protobuf::rt::LazyV2<SnapshotMetadataRecord> = ::protobuf::rt::LazyV2::INIT;
instance.get(SnapshotMetadataRecord::new)
}
}
impl ::protobuf::Clear for SnapshotMetadataRecord {
fn clear(&mut self) {
self.graph_hash.clear();
self.run_id.clear();
self.creation_timestamp = 0;
self.finalized = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for SnapshotMetadataRecord {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SnapshotMetadataRecord {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n9tensorflow/core/protobuf/data/experimental/snapshot.proto\x12\x1ctens\
orflow.data.experimental\x1a&tensorflow/core/framework/tensor.proto\"A\n\
\x0eSnapshotRecord\x12/\n\x06tensor\x18\x01\x20\x03(\x0b2\x17.tensorflow\
.TensorProtoR\x06tensor\"\x9c\x01\n\x16SnapshotMetadataRecord\x12\x1d\n\
\ngraph_hash\x18\x01\x20\x01(\tR\tgraphHash\x12\x15\n\x06run_id\x18\x02\
\x20\x01(\tR\x05runId\x12-\n\x12creation_timestamp\x18\x03\x20\x01(\x03R\
\x11creationTimestamp\x12\x1d\n\tfinalized\x18\xe8\x07\x20\x01(\x08R\tfi\
nalizedb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}