tensorflow_serving_client/
versions.rs

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