tensorboard_proto/
versions.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/versions.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 VersionDef {
28    // message fields
29    pub producer: i32,
30    pub min_consumer: i32,
31    pub bad_consumers: ::std::vec::Vec<i32>,
32    // special fields
33    pub unknown_fields: ::protobuf::UnknownFields,
34    pub cached_size: ::protobuf::CachedSize,
35}
36
37impl<'a> ::std::default::Default for &'a VersionDef {
38    fn default() -> &'a VersionDef {
39        <VersionDef as ::protobuf::Message>::default_instance()
40    }
41}
42
43impl VersionDef {
44    pub fn new() -> VersionDef {
45        ::std::default::Default::default()
46    }
47
48    // int32 producer = 1;
49
50
51    pub fn get_producer(&self) -> i32 {
52        self.producer
53    }
54    pub fn clear_producer(&mut self) {
55        self.producer = 0;
56    }
57
58    // Param is passed by value, moved
59    pub fn set_producer(&mut self, v: i32) {
60        self.producer = v;
61    }
62
63    // int32 min_consumer = 2;
64
65
66    pub fn get_min_consumer(&self) -> i32 {
67        self.min_consumer
68    }
69    pub fn clear_min_consumer(&mut self) {
70        self.min_consumer = 0;
71    }
72
73    // Param is passed by value, moved
74    pub fn set_min_consumer(&mut self, v: i32) {
75        self.min_consumer = v;
76    }
77
78    // repeated int32 bad_consumers = 3;
79
80
81    pub fn get_bad_consumers(&self) -> &[i32] {
82        &self.bad_consumers
83    }
84    pub fn clear_bad_consumers(&mut self) {
85        self.bad_consumers.clear();
86    }
87
88    // Param is passed by value, moved
89    pub fn set_bad_consumers(&mut self, v: ::std::vec::Vec<i32>) {
90        self.bad_consumers = v;
91    }
92
93    // Mutable pointer to the field.
94    pub fn mut_bad_consumers(&mut self) -> &mut ::std::vec::Vec<i32> {
95        &mut self.bad_consumers
96    }
97
98    // Take field
99    pub fn take_bad_consumers(&mut self) -> ::std::vec::Vec<i32> {
100        ::std::mem::replace(&mut self.bad_consumers, ::std::vec::Vec::new())
101    }
102}
103
104impl ::protobuf::Message for VersionDef {
105    fn is_initialized(&self) -> bool {
106        true
107    }
108
109    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
110        while !is.eof()? {
111            let (field_number, wire_type) = is.read_tag_unpack()?;
112            match field_number {
113                1 => {
114                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
115                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
116                    }
117                    let tmp = is.read_int32()?;
118                    self.producer = tmp;
119                },
120                2 => {
121                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
122                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
123                    }
124                    let tmp = is.read_int32()?;
125                    self.min_consumer = tmp;
126                },
127                3 => {
128                    ::protobuf::rt::read_repeated_int32_into(wire_type, is, &mut self.bad_consumers)?;
129                },
130                _ => {
131                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
132                },
133            };
134        }
135        ::std::result::Result::Ok(())
136    }
137
138    // Compute sizes of nested messages
139    #[allow(unused_variables)]
140    fn compute_size(&self) -> u32 {
141        let mut my_size = 0;
142        if self.producer != 0 {
143            my_size += ::protobuf::rt::value_size(1, self.producer, ::protobuf::wire_format::WireTypeVarint);
144        }
145        if self.min_consumer != 0 {
146            my_size += ::protobuf::rt::value_size(2, self.min_consumer, ::protobuf::wire_format::WireTypeVarint);
147        }
148        for value in &self.bad_consumers {
149            my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint);
150        };
151        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
152        self.cached_size.set(my_size);
153        my_size
154    }
155
156    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
157        if self.producer != 0 {
158            os.write_int32(1, self.producer)?;
159        }
160        if self.min_consumer != 0 {
161            os.write_int32(2, self.min_consumer)?;
162        }
163        for v in &self.bad_consumers {
164            os.write_int32(3, *v)?;
165        };
166        os.write_unknown_fields(self.get_unknown_fields())?;
167        ::std::result::Result::Ok(())
168    }
169
170    fn get_cached_size(&self) -> u32 {
171        self.cached_size.get()
172    }
173
174    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
175        &self.unknown_fields
176    }
177
178    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
179        &mut self.unknown_fields
180    }
181
182    fn as_any(&self) -> &dyn (::std::any::Any) {
183        self as &dyn (::std::any::Any)
184    }
185    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
186        self as &mut dyn (::std::any::Any)
187    }
188    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
189        self
190    }
191
192    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
193        Self::descriptor_static()
194    }
195
196    fn new() -> VersionDef {
197        VersionDef::new()
198    }
199
200    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
201        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
202        descriptor.get(|| {
203            let mut fields = ::std::vec::Vec::new();
204            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
205                "producer",
206                |m: &VersionDef| { &m.producer },
207                |m: &mut VersionDef| { &mut m.producer },
208            ));
209            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
210                "min_consumer",
211                |m: &VersionDef| { &m.min_consumer },
212                |m: &mut VersionDef| { &mut m.min_consumer },
213            ));
214            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
215                "bad_consumers",
216                |m: &VersionDef| { &m.bad_consumers },
217                |m: &mut VersionDef| { &mut m.bad_consumers },
218            ));
219            ::protobuf::reflect::MessageDescriptor::new_pb_name::<VersionDef>(
220                "VersionDef",
221                fields,
222                file_descriptor_proto()
223            )
224        })
225    }
226
227    fn default_instance() -> &'static VersionDef {
228        static instance: ::protobuf::rt::LazyV2<VersionDef> = ::protobuf::rt::LazyV2::INIT;
229        instance.get(VersionDef::new)
230    }
231}
232
233impl ::protobuf::Clear for VersionDef {
234    fn clear(&mut self) {
235        self.producer = 0;
236        self.min_consumer = 0;
237        self.bad_consumers.clear();
238        self.unknown_fields.clear();
239    }
240}
241
242impl ::std::fmt::Debug for VersionDef {
243    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
244        ::protobuf::text_format::fmt(self, f)
245    }
246}
247
248impl ::protobuf::reflect::ProtobufValue for VersionDef {
249    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
250        ::protobuf::reflect::ReflectValueRef::Message(self)
251    }
252}
253
254static file_descriptor_proto_data: &'static [u8] = b"\
255    \n\x12src/versions.proto\x12\rtensorboardrs\"p\n\nVersionDef\x12\x1a\n\
256    \x08producer\x18\x01\x20\x01(\x05R\x08producer\x12!\n\x0cmin_consumer\
257    \x18\x02\x20\x01(\x05R\x0bminConsumer\x12#\n\rbad_consumers\x18\x03\x20\
258    \x03(\x05R\x0cbadConsumersB/\n\x18org.tensorflow.frameworkB\x0eVersionsP\
259    rotosP\x01\xf8\x01\x01J\x9d\x07\n\x06\x12\x04\0\0\x1e\x02\n\x08\n\x01\
260    \x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x16\n\x08\n\x01\x08\
261    \x12\x03\x03\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x03\0\x1f\n\x08\n\x01\x08\
262    \x12\x03\x04\0/\n\t\n\x02\x08\x08\x12\x03\x04\0/\n\x08\n\x01\x08\x12\x03\
263    \x05\0\"\n\t\n\x02\x08\n\x12\x03\x05\0\"\n\x08\n\x01\x08\x12\x03\x06\01\
264    \n\t\n\x02\x08\x01\x12\x03\x06\01\n\xa8\x03\n\x02\x04\0\x12\x04\x15\0\
265    \x1e\x01\x1a\x9b\x03\x20Version\x20information\x20for\x20a\x20piece\x20o\
266    f\x20serialized\x20data\n\n\x20There\x20are\x20different\x20types\x20of\
267    \x20versions\x20for\x20each\x20type\x20of\x20data\n\x20(GraphDef,\x20etc\
268    .),\x20but\x20they\x20all\x20have\x20the\x20same\x20common\x20shape\n\
269    \x20described\x20here.\n\n\x20Each\x20consumer\x20has\x20\"consumer\"\
270    \x20and\x20\"min_producer\"\x20versions\x20(specified\n\x20elsewhere).\
271    \x20\x20A\x20consumer\x20is\x20allowed\x20to\x20consume\x20this\x20data\
272    \x20if\n\n\x20\x20\x20producer\x20>=\x20min_producer\n\x20\x20\x20consum\
273    er\x20>=\x20min_consumer\n\x20\x20\x20consumer\x20not\x20in\x20bad_consu\
274    mers\n\n\n\n\n\x03\x04\0\x01\x12\x03\x15\x08\x12\n?\n\x04\x04\0\x02\0\
275    \x12\x03\x17\x02\x15\x1a2\x20The\x20version\x20of\x20the\x20code\x20that\
276    \x20produced\x20this\x20data.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x17\
277    \x02\x07\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x17\x08\x10\n\x0c\n\x05\x04\
278    \0\x02\0\x03\x12\x03\x17\x13\x14\nS\n\x04\x04\0\x02\x01\x12\x03\x1a\x02\
279    \x19\x1aF\x20Any\x20consumer\x20below\x20this\x20version\x20is\x20not\
280    \x20allowed\x20to\x20consume\x20this\x20data.\n\n\x0c\n\x05\x04\0\x02\
281    \x01\x05\x12\x03\x1a\x02\x07\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x1a\
282    \x08\x14\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x1a\x17\x18\nR\n\x04\x04\
283    \0\x02\x02\x12\x03\x1d\x02#\x1aE\x20Specific\x20consumer\x20versions\x20\
284    which\x20are\x20disallowed\x20(e.g.\x20due\x20to\x20bugs).\n\n\x0c\n\x05\
285    \x04\0\x02\x02\x04\x12\x03\x1d\x02\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\
286    \x03\x1d\x0b\x10\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x1d\x11\x1e\n\x0c\
287    \n\x05\x04\0\x02\x02\x03\x12\x03\x1d!\"b\x06proto3\
288";
289
290static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
291
292fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
293    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
294}
295
296pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
297    file_descriptor_proto_lazy.get(|| {
298        parse_descriptor_proto()
299    })
300}