tensorboard_proto/
node_def.rs

1// This file is generated by rust-protobuf 2.27.1. Do not edit
2// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `src/node_def.proto`
21
22/// Generated files are compatible only with the same version
23/// of protobuf runtime.
24// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
25
26#[derive(PartialEq,Clone,Default)]
27pub struct NodeDef {
28    // message fields
29    pub name: ::std::string::String,
30    pub op: ::std::string::String,
31    pub input: ::protobuf::RepeatedField<::std::string::String>,
32    pub device: ::std::string::String,
33    pub attr: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
34    // special fields
35    pub unknown_fields: ::protobuf::UnknownFields,
36    pub cached_size: ::protobuf::CachedSize,
37}
38
39impl<'a> ::std::default::Default for &'a NodeDef {
40    fn default() -> &'a NodeDef {
41        <NodeDef as ::protobuf::Message>::default_instance()
42    }
43}
44
45impl NodeDef {
46    pub fn new() -> NodeDef {
47        ::std::default::Default::default()
48    }
49
50    // string name = 1;
51
52
53    pub fn get_name(&self) -> &str {
54        &self.name
55    }
56    pub fn clear_name(&mut self) {
57        self.name.clear();
58    }
59
60    // Param is passed by value, moved
61    pub fn set_name(&mut self, v: ::std::string::String) {
62        self.name = v;
63    }
64
65    // Mutable pointer to the field.
66    // If field is not initialized, it is initialized with default value first.
67    pub fn mut_name(&mut self) -> &mut ::std::string::String {
68        &mut self.name
69    }
70
71    // Take field
72    pub fn take_name(&mut self) -> ::std::string::String {
73        ::std::mem::replace(&mut self.name, ::std::string::String::new())
74    }
75
76    // string op = 2;
77
78
79    pub fn get_op(&self) -> &str {
80        &self.op
81    }
82    pub fn clear_op(&mut self) {
83        self.op.clear();
84    }
85
86    // Param is passed by value, moved
87    pub fn set_op(&mut self, v: ::std::string::String) {
88        self.op = v;
89    }
90
91    // Mutable pointer to the field.
92    // If field is not initialized, it is initialized with default value first.
93    pub fn mut_op(&mut self) -> &mut ::std::string::String {
94        &mut self.op
95    }
96
97    // Take field
98    pub fn take_op(&mut self) -> ::std::string::String {
99        ::std::mem::replace(&mut self.op, ::std::string::String::new())
100    }
101
102    // repeated string input = 3;
103
104
105    pub fn get_input(&self) -> &[::std::string::String] {
106        &self.input
107    }
108    pub fn clear_input(&mut self) {
109        self.input.clear();
110    }
111
112    // Param is passed by value, moved
113    pub fn set_input(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
114        self.input = v;
115    }
116
117    // Mutable pointer to the field.
118    pub fn mut_input(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
119        &mut self.input
120    }
121
122    // Take field
123    pub fn take_input(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
124        ::std::mem::replace(&mut self.input, ::protobuf::RepeatedField::new())
125    }
126
127    // string device = 4;
128
129
130    pub fn get_device(&self) -> &str {
131        &self.device
132    }
133    pub fn clear_device(&mut self) {
134        self.device.clear();
135    }
136
137    // Param is passed by value, moved
138    pub fn set_device(&mut self, v: ::std::string::String) {
139        self.device = v;
140    }
141
142    // Mutable pointer to the field.
143    // If field is not initialized, it is initialized with default value first.
144    pub fn mut_device(&mut self) -> &mut ::std::string::String {
145        &mut self.device
146    }
147
148    // Take field
149    pub fn take_device(&mut self) -> ::std::string::String {
150        ::std::mem::replace(&mut self.device, ::std::string::String::new())
151    }
152
153    // repeated .tensorboardrs.NodeDef.AttrEntry attr = 5;
154
155
156    pub fn get_attr(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
157        &self.attr
158    }
159    pub fn clear_attr(&mut self) {
160        self.attr.clear();
161    }
162
163    // Param is passed by value, moved
164    pub fn set_attr(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
165        self.attr = v;
166    }
167
168    // Mutable pointer to the field.
169    pub fn mut_attr(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
170        &mut self.attr
171    }
172
173    // Take field
174    pub fn take_attr(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
175        ::std::mem::replace(&mut self.attr, ::std::collections::HashMap::new())
176    }
177}
178
179impl ::protobuf::Message for NodeDef {
180    fn is_initialized(&self) -> bool {
181        true
182    }
183
184    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
185        while !is.eof()? {
186            let (field_number, wire_type) = is.read_tag_unpack()?;
187            match field_number {
188                1 => {
189                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
190                },
191                2 => {
192                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.op)?;
193                },
194                3 => {
195                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.input)?;
196                },
197                4 => {
198                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.device)?;
199                },
200                5 => {
201                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.attr)?;
202                },
203                _ => {
204                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
205                },
206            };
207        }
208        ::std::result::Result::Ok(())
209    }
210
211    // Compute sizes of nested messages
212    #[allow(unused_variables)]
213    fn compute_size(&self) -> u32 {
214        let mut my_size = 0;
215        if !self.name.is_empty() {
216            my_size += ::protobuf::rt::string_size(1, &self.name);
217        }
218        if !self.op.is_empty() {
219            my_size += ::protobuf::rt::string_size(2, &self.op);
220        }
221        for value in &self.input {
222            my_size += ::protobuf::rt::string_size(3, &value);
223        };
224        if !self.device.is_empty() {
225            my_size += ::protobuf::rt::string_size(4, &self.device);
226        }
227        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr);
228        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
229        self.cached_size.set(my_size);
230        my_size
231    }
232
233    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
234        if !self.name.is_empty() {
235            os.write_string(1, &self.name)?;
236        }
237        if !self.op.is_empty() {
238            os.write_string(2, &self.op)?;
239        }
240        for v in &self.input {
241            os.write_string(3, &v)?;
242        };
243        if !self.device.is_empty() {
244            os.write_string(4, &self.device)?;
245        }
246        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr, os)?;
247        os.write_unknown_fields(self.get_unknown_fields())?;
248        ::std::result::Result::Ok(())
249    }
250
251    fn get_cached_size(&self) -> u32 {
252        self.cached_size.get()
253    }
254
255    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
256        &self.unknown_fields
257    }
258
259    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
260        &mut self.unknown_fields
261    }
262
263    fn as_any(&self) -> &dyn (::std::any::Any) {
264        self as &dyn (::std::any::Any)
265    }
266    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
267        self as &mut dyn (::std::any::Any)
268    }
269    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
270        self
271    }
272
273    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
274        Self::descriptor_static()
275    }
276
277    fn new() -> NodeDef {
278        NodeDef::new()
279    }
280
281    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
282        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
283        descriptor.get(|| {
284            let mut fields = ::std::vec::Vec::new();
285            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
286                "name",
287                |m: &NodeDef| { &m.name },
288                |m: &mut NodeDef| { &mut m.name },
289            ));
290            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
291                "op",
292                |m: &NodeDef| { &m.op },
293                |m: &mut NodeDef| { &mut m.op },
294            ));
295            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
296                "input",
297                |m: &NodeDef| { &m.input },
298                |m: &mut NodeDef| { &mut m.input },
299            ));
300            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
301                "device",
302                |m: &NodeDef| { &m.device },
303                |m: &mut NodeDef| { &mut m.device },
304            ));
305            fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
306                "attr",
307                |m: &NodeDef| { &m.attr },
308                |m: &mut NodeDef| { &mut m.attr },
309            ));
310            ::protobuf::reflect::MessageDescriptor::new_pb_name::<NodeDef>(
311                "NodeDef",
312                fields,
313                file_descriptor_proto()
314            )
315        })
316    }
317
318    fn default_instance() -> &'static NodeDef {
319        static instance: ::protobuf::rt::LazyV2<NodeDef> = ::protobuf::rt::LazyV2::INIT;
320        instance.get(NodeDef::new)
321    }
322}
323
324impl ::protobuf::Clear for NodeDef {
325    fn clear(&mut self) {
326        self.name.clear();
327        self.op.clear();
328        self.input.clear();
329        self.device.clear();
330        self.attr.clear();
331        self.unknown_fields.clear();
332    }
333}
334
335impl ::std::fmt::Debug for NodeDef {
336    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
337        ::protobuf::text_format::fmt(self, f)
338    }
339}
340
341impl ::protobuf::reflect::ProtobufValue for NodeDef {
342    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
343        ::protobuf::reflect::ReflectValueRef::Message(self)
344    }
345}
346
347static file_descriptor_proto_data: &'static [u8] = b"\
348    \n\x12src/node_def.proto\x12\rtensorboardrs\x1a\x14src/attr_value.proto\
349    \"\xe4\x01\n\x07NodeDef\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\
350    \x12\x0e\n\x02op\x18\x02\x20\x01(\tR\x02op\x12\x14\n\x05input\x18\x03\
351    \x20\x03(\tR\x05input\x12\x16\n\x06device\x18\x04\x20\x01(\tR\x06device\
352    \x124\n\x04attr\x18\x05\x20\x03(\x0b2\x20.tensorboardrs.NodeDef.AttrEntr\
353    yR\x04attr\x1aQ\n\tAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\
354    \x12.\n\x05value\x18\x02\x20\x01(\x0b2\x18.tensorboardrs.AttrValueR\x05v\
355    alue:\x028\x01B*\n\x18org.tensorflow.frameworkB\tNodeProtoP\x01\xf8\x01\
356    \x01J\x9d\x13\n\x06\x12\x04\0\0>\x02\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
357    \x08\n\x01\x02\x12\x03\x02\0\x16\n\x08\n\x01\x08\x12\x03\x03\0\x1f\n\t\n\
358    \x02\x08\x1f\x12\x03\x03\0\x1f\n\x08\n\x01\x08\x12\x03\x04\0*\n\t\n\x02\
359    \x08\x08\x12\x03\x04\0*\n\x08\n\x01\x08\x12\x03\x05\0\"\n\t\n\x02\x08\n\
360    \x12\x03\x05\0\"\n\x08\n\x01\x08\x12\x03\x06\01\n\t\n\x02\x08\x01\x12\
361    \x03\x06\01\n\t\n\x02\x03\0\x12\x03\x08\0\x1e\n\n\n\x02\x04\0\x12\x04\n\
362    \0>\x01\n\n\n\x03\x04\0\x01\x12\x03\n\x08\x0f\n\xbe\x01\n\x04\x04\0\x02\
363    \0\x12\x03\x0e\x02\x12\x1a\xb0\x01\x20The\x20name\x20given\x20to\x20this\
364    \x20operator.\x20Used\x20for\x20naming\x20inputs,\n\x20logging,\x20visua\
365    lization,\x20etc.\x20\x20Unique\x20within\x20a\x20single\x20GraphDef.\n\
366    \x20Must\x20match\x20the\x20regexp\x20\"[A-Za-z0-9.][A-Za-z0-9_./]*\".\n\
367    \n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x0e\x02\x08\n\x0c\n\x05\x04\0\x02\0\
368    \x01\x12\x03\x0e\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x0e\x10\x11\n\
369    \x92\x01\n\x04\x04\0\x02\x01\x12\x03\x12\x02\x10\x1a\x84\x01\x20The\x20o\
370    peration\x20name.\x20\x20There\x20may\x20be\x20custom\x20parameters\x20i\
371    n\x20attrs.\n\x20Op\x20names\x20starting\x20with\x20an\x20underscore\x20\
372    are\x20reserved\x20for\x20internal\x20use.\n\n\x0c\n\x05\x04\0\x02\x01\
373    \x05\x12\x03\x12\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x12\t\x0b\
374    \n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x12\x0e\x0f\n\xa7\x02\n\x04\x04\0\
375    \x02\x02\x12\x03\x19\x02\x1c\x1a\x99\x02\x20Each\x20input\x20is\x20\"nod\
376    e:src_output\"\x20with\x20\"node\"\x20being\x20a\x20string\x20name\x20an\
377    d\n\x20\"src_output\"\x20indicating\x20which\x20output\x20tensor\x20to\
378    \x20use\x20from\x20\"node\".\x20If\n\x20\"src_output\"\x20is\x200\x20the\
379    \x20\":0\"\x20suffix\x20can\x20be\x20omitted.\x20\x20Regular\x20inputs\n\
380    \x20may\x20optionally\x20be\x20followed\x20by\x20control\x20inputs\x20th\
381    at\x20have\x20the\x20format\n\x20\"^node\".\n\n\x0c\n\x05\x04\0\x02\x02\
382    \x04\x12\x03\x19\x02\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x19\x0b\x11\
383    \n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x19\x12\x17\n\x0c\n\x05\x04\0\x02\
384    \x02\x03\x12\x03\x19\x1a\x1b\n\x90\x06\n\x04\x04\0\x02\x03\x12\x03/\x02\
385    \x14\x1a\x82\x06\x20A\x20(possibly\x20partial)\x20specification\x20for\
386    \x20the\x20device\x20on\x20which\x20this\n\x20node\x20should\x20be\x20pl\
387    aced.\n\x20The\x20expected\x20syntax\x20for\x20this\x20string\x20is\x20a\
388    s\x20follows:\n\n\x20DEVICE_SPEC\x20::=\x20PARTIAL_SPEC\n\n\x20PARTIAL_S\
389    PEC\x20::=\x20(\"/\"\x20CONSTRAINT)\x20*\n\x20CONSTRAINT\x20::=\x20(\"jo\
390    b:\"\x20JOB_NAME)\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
391    \x20|\x20(\"replica:\"\x20[1-9][0-9]*)\n\x20\x20\x20\x20\x20\x20\x20\x20\
392    \x20\x20\x20\x20\x20\x20|\x20(\"task:\"\x20[1-9][0-9]*)\n\x20\x20\x20\
393    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20|\x20(\x20(\"gpu\"\x20|\x20\
394    \"cpu\")\x20\":\"\x20([1-9][0-9]*\x20|\x20\"*\")\x20)\n\n\x20Valid\x20va\
395    lues\x20for\x20this\x20string\x20include:\n\x20*\x20\"/job:worker/replic\
396    a:0/task:1/gpu:3\"\x20\x20(full\x20specification)\n\x20*\x20\"/job:worke\
397    r/gpu:3\"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
398    \x20\x20\x20\x20(partial\x20specification)\n\x20*\x20\"\"\x20\x20\x20\
399    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
400    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(no\x20speci\
401    fication)\n\n\x20If\x20the\x20constraints\x20do\x20not\x20resolve\x20to\
402    \x20a\x20single\x20device\x20(or\x20if\x20this\n\x20field\x20is\x20empty\
403    \x20or\x20not\x20present),\x20the\x20runtime\x20will\x20attempt\x20to\n\
404    \x20choose\x20a\x20device\x20automatically.\n\n\x0c\n\x05\x04\0\x02\x03\
405    \x05\x12\x03/\x02\x08\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03/\t\x0f\n\x0c\
406    \n\x05\x04\0\x02\x03\x03\x12\x03/\x12\x13\n\x94\x05\n\x04\x04\0\x02\x04\
407    \x12\x03=\x02\"\x1a\x86\x05\x20Operation-specific\x20graph-construction-\
408    time\x20configuration.\n\x20Note\x20that\x20this\x20should\x20include\
409    \x20all\x20attrs\x20defined\x20in\x20the\n\x20corresponding\x20OpDef,\
410    \x20including\x20those\x20with\x20a\x20value\x20matching\n\x20the\x20def\
411    ault\x20--\x20this\x20allows\x20the\x20default\x20to\x20change\x20and\
412    \x20makes\n\x20NodeDefs\x20easier\x20to\x20interpret\x20on\x20their\x20o\
413    wn.\x20\x20However,\x20if\n\x20an\x20attr\x20with\x20a\x20default\x20is\
414    \x20not\x20specified\x20in\x20this\x20list,\x20the\n\x20default\x20will\
415    \x20be\x20used.\n\x20The\x20\"names\"\x20(keys)\x20must\x20match\x20the\
416    \x20regexp\x20\"[a-z][a-z0-9_]+\"\x20(and\n\x20one\x20of\x20the\x20names\
417    \x20from\x20the\x20corresponding\x20OpDef's\x20attr\x20field).\n\x20The\
418    \x20values\x20must\x20have\x20a\x20type\x20matching\x20the\x20correspond\
419    ing\x20OpDef\n\x20attr's\x20type\x20field.\n\x20TODO(josh11b):\x20Add\
420    \x20some\x20examples\x20here\x20showing\x20best\x20practices.\n\n\x0c\n\
421    \x05\x04\0\x02\x04\x06\x12\x03=\x02\x18\n\x0c\n\x05\x04\0\x02\x04\x01\
422    \x12\x03=\x19\x1d\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03=\x20!b\x06proto3\
423";
424
425static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
426
427fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
428    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
429}
430
431pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
432    file_descriptor_proto_lazy.get(|| {
433        parse_descriptor_proto()
434    })
435}