tensorflow_serving_client/
model_management.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_serving/apis/model_management.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 ReloadConfigRequest {
31    // message fields
32    pub config: ::protobuf::SingularPtrField<super::model_server_config::ModelServerConfig>,
33    // special fields
34    pub unknown_fields: ::protobuf::UnknownFields,
35    pub cached_size: ::protobuf::CachedSize,
36}
37
38impl<'a> ::std::default::Default for &'a ReloadConfigRequest {
39    fn default() -> &'a ReloadConfigRequest {
40        <ReloadConfigRequest as ::protobuf::Message>::default_instance()
41    }
42}
43
44impl ReloadConfigRequest {
45    pub fn new() -> ReloadConfigRequest {
46        ::std::default::Default::default()
47    }
48
49    // .tensorflow.serving.ModelServerConfig config = 1;
50
51
52    pub fn get_config(&self) -> &super::model_server_config::ModelServerConfig {
53        self.config.as_ref().unwrap_or_else(|| super::model_server_config::ModelServerConfig::default_instance())
54    }
55    pub fn clear_config(&mut self) {
56        self.config.clear();
57    }
58
59    pub fn has_config(&self) -> bool {
60        self.config.is_some()
61    }
62
63    // Param is passed by value, moved
64    pub fn set_config(&mut self, v: super::model_server_config::ModelServerConfig) {
65        self.config = ::protobuf::SingularPtrField::some(v);
66    }
67
68    // Mutable pointer to the field.
69    // If field is not initialized, it is initialized with default value first.
70    pub fn mut_config(&mut self) -> &mut super::model_server_config::ModelServerConfig {
71        if self.config.is_none() {
72            self.config.set_default();
73        }
74        self.config.as_mut().unwrap()
75    }
76
77    // Take field
78    pub fn take_config(&mut self) -> super::model_server_config::ModelServerConfig {
79        self.config.take().unwrap_or_else(|| super::model_server_config::ModelServerConfig::new())
80    }
81}
82
83impl ::protobuf::Message for ReloadConfigRequest {
84    fn is_initialized(&self) -> bool {
85        for v in &self.config {
86            if !v.is_initialized() {
87                return false;
88            }
89        };
90        true
91    }
92
93    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
94        while !is.eof()? {
95            let (field_number, wire_type) = is.read_tag_unpack()?;
96            match field_number {
97                1 => {
98                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.config)?;
99                },
100                _ => {
101                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
102                },
103            };
104        }
105        ::std::result::Result::Ok(())
106    }
107
108    // Compute sizes of nested messages
109    #[allow(unused_variables)]
110    fn compute_size(&self) -> u32 {
111        let mut my_size = 0;
112        if let Some(ref v) = self.config.as_ref() {
113            let len = v.compute_size();
114            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
115        }
116        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
117        self.cached_size.set(my_size);
118        my_size
119    }
120
121    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
122        if let Some(ref v) = self.config.as_ref() {
123            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
124            os.write_raw_varint32(v.get_cached_size())?;
125            v.write_to_with_cached_sizes(os)?;
126        }
127        os.write_unknown_fields(self.get_unknown_fields())?;
128        ::std::result::Result::Ok(())
129    }
130
131    fn get_cached_size(&self) -> u32 {
132        self.cached_size.get()
133    }
134
135    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
136        &self.unknown_fields
137    }
138
139    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
140        &mut self.unknown_fields
141    }
142
143    fn as_any(&self) -> &dyn (::std::any::Any) {
144        self as &dyn (::std::any::Any)
145    }
146    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
147        self as &mut dyn (::std::any::Any)
148    }
149    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
150        self
151    }
152
153    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
154        Self::descriptor_static()
155    }
156
157    fn new() -> ReloadConfigRequest {
158        ReloadConfigRequest::new()
159    }
160
161    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
162        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
163        unsafe {
164            descriptor.get(|| {
165                let mut fields = ::std::vec::Vec::new();
166                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::model_server_config::ModelServerConfig>>(
167                    "config",
168                    |m: &ReloadConfigRequest| { &m.config },
169                    |m: &mut ReloadConfigRequest| { &mut m.config },
170                ));
171                ::protobuf::reflect::MessageDescriptor::new_pb_name::<ReloadConfigRequest>(
172                    "ReloadConfigRequest",
173                    fields,
174                    file_descriptor_proto()
175                )
176            })
177        }
178    }
179
180    fn default_instance() -> &'static ReloadConfigRequest {
181        static mut instance: ::protobuf::lazy::Lazy<ReloadConfigRequest> = ::protobuf::lazy::Lazy::INIT;
182        unsafe {
183            instance.get(ReloadConfigRequest::new)
184        }
185    }
186}
187
188impl ::protobuf::Clear for ReloadConfigRequest {
189    fn clear(&mut self) {
190        self.config.clear();
191        self.unknown_fields.clear();
192    }
193}
194
195impl ::std::fmt::Debug for ReloadConfigRequest {
196    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
197        ::protobuf::text_format::fmt(self, f)
198    }
199}
200
201impl ::protobuf::reflect::ProtobufValue for ReloadConfigRequest {
202    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
203        ::protobuf::reflect::ReflectValueRef::Message(self)
204    }
205}
206
207#[derive(PartialEq,Clone,Default)]
208pub struct ReloadConfigResponse {
209    // message fields
210    pub status: ::protobuf::SingularPtrField<super::status::StatusProto>,
211    // special fields
212    pub unknown_fields: ::protobuf::UnknownFields,
213    pub cached_size: ::protobuf::CachedSize,
214}
215
216impl<'a> ::std::default::Default for &'a ReloadConfigResponse {
217    fn default() -> &'a ReloadConfigResponse {
218        <ReloadConfigResponse as ::protobuf::Message>::default_instance()
219    }
220}
221
222impl ReloadConfigResponse {
223    pub fn new() -> ReloadConfigResponse {
224        ::std::default::Default::default()
225    }
226
227    // .tensorflow.serving.StatusProto status = 1;
228
229
230    pub fn get_status(&self) -> &super::status::StatusProto {
231        self.status.as_ref().unwrap_or_else(|| super::status::StatusProto::default_instance())
232    }
233    pub fn clear_status(&mut self) {
234        self.status.clear();
235    }
236
237    pub fn has_status(&self) -> bool {
238        self.status.is_some()
239    }
240
241    // Param is passed by value, moved
242    pub fn set_status(&mut self, v: super::status::StatusProto) {
243        self.status = ::protobuf::SingularPtrField::some(v);
244    }
245
246    // Mutable pointer to the field.
247    // If field is not initialized, it is initialized with default value first.
248    pub fn mut_status(&mut self) -> &mut super::status::StatusProto {
249        if self.status.is_none() {
250            self.status.set_default();
251        }
252        self.status.as_mut().unwrap()
253    }
254
255    // Take field
256    pub fn take_status(&mut self) -> super::status::StatusProto {
257        self.status.take().unwrap_or_else(|| super::status::StatusProto::new())
258    }
259}
260
261impl ::protobuf::Message for ReloadConfigResponse {
262    fn is_initialized(&self) -> bool {
263        for v in &self.status {
264            if !v.is_initialized() {
265                return false;
266            }
267        };
268        true
269    }
270
271    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
272        while !is.eof()? {
273            let (field_number, wire_type) = is.read_tag_unpack()?;
274            match field_number {
275                1 => {
276                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.status)?;
277                },
278                _ => {
279                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
280                },
281            };
282        }
283        ::std::result::Result::Ok(())
284    }
285
286    // Compute sizes of nested messages
287    #[allow(unused_variables)]
288    fn compute_size(&self) -> u32 {
289        let mut my_size = 0;
290        if let Some(ref v) = self.status.as_ref() {
291            let len = v.compute_size();
292            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
293        }
294        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
295        self.cached_size.set(my_size);
296        my_size
297    }
298
299    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
300        if let Some(ref v) = self.status.as_ref() {
301            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
302            os.write_raw_varint32(v.get_cached_size())?;
303            v.write_to_with_cached_sizes(os)?;
304        }
305        os.write_unknown_fields(self.get_unknown_fields())?;
306        ::std::result::Result::Ok(())
307    }
308
309    fn get_cached_size(&self) -> u32 {
310        self.cached_size.get()
311    }
312
313    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
314        &self.unknown_fields
315    }
316
317    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
318        &mut self.unknown_fields
319    }
320
321    fn as_any(&self) -> &dyn (::std::any::Any) {
322        self as &dyn (::std::any::Any)
323    }
324    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
325        self as &mut dyn (::std::any::Any)
326    }
327    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
328        self
329    }
330
331    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
332        Self::descriptor_static()
333    }
334
335    fn new() -> ReloadConfigResponse {
336        ReloadConfigResponse::new()
337    }
338
339    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
340        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
341        unsafe {
342            descriptor.get(|| {
343                let mut fields = ::std::vec::Vec::new();
344                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::status::StatusProto>>(
345                    "status",
346                    |m: &ReloadConfigResponse| { &m.status },
347                    |m: &mut ReloadConfigResponse| { &mut m.status },
348                ));
349                ::protobuf::reflect::MessageDescriptor::new_pb_name::<ReloadConfigResponse>(
350                    "ReloadConfigResponse",
351                    fields,
352                    file_descriptor_proto()
353                )
354            })
355        }
356    }
357
358    fn default_instance() -> &'static ReloadConfigResponse {
359        static mut instance: ::protobuf::lazy::Lazy<ReloadConfigResponse> = ::protobuf::lazy::Lazy::INIT;
360        unsafe {
361            instance.get(ReloadConfigResponse::new)
362        }
363    }
364}
365
366impl ::protobuf::Clear for ReloadConfigResponse {
367    fn clear(&mut self) {
368        self.status.clear();
369        self.unknown_fields.clear();
370    }
371}
372
373impl ::std::fmt::Debug for ReloadConfigResponse {
374    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
375        ::protobuf::text_format::fmt(self, f)
376    }
377}
378
379impl ::protobuf::reflect::ProtobufValue for ReloadConfigResponse {
380    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
381        ::protobuf::reflect::ReflectValueRef::Message(self)
382    }
383}
384
385static file_descriptor_proto_data: &'static [u8] = b"\
386    \n.tensorflow_serving/apis/model_management.proto\x12\x12tensorflow.serv\
387    ing\x1a3tensorflow_serving/config/model_server_config.proto\x1a$tensorfl\
388    ow_serving/util/status.proto\"T\n\x13ReloadConfigRequest\x12=\n\x06confi\
389    g\x18\x01\x20\x01(\x0b2%.tensorflow.serving.ModelServerConfigR\x06config\
390    \"O\n\x14ReloadConfigResponse\x127\n\x06status\x18\x01\x20\x01(\x0b2\x1f\
391    .tensorflow.serving.StatusProtoR\x06statusB\x03\xf8\x01\x01J\xe5\x01\n\
392    \x06\x12\x04\0\0\x0e\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\
393    \x12\x03\x02\0=\n\t\n\x02\x03\x01\x12\x03\x03\0.\n\x08\n\x01\x02\x12\x03\
394    \x05\0\x1b\n\x08\n\x01\x08\x12\x03\x06\0\x1f\n\t\n\x02\x08\x1f\x12\x03\
395    \x06\0\x1f\n\n\n\x02\x04\0\x12\x04\x08\0\n\x01\n\n\n\x03\x04\0\x01\x12\
396    \x03\x08\x08\x1b\n\x0b\n\x04\x04\0\x02\0\x12\x03\t\x02\x1f\n\x0c\n\x05\
397    \x04\0\x02\0\x06\x12\x03\t\x02\x13\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\t\
398    \x14\x1a\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\t\x1d\x1e\n\n\n\x02\x04\x01\
399    \x12\x04\x0c\0\x0e\x01\n\n\n\x03\x04\x01\x01\x12\x03\x0c\x08\x1c\n\x0b\n\
400    \x04\x04\x01\x02\0\x12\x03\r\x02\x19\n\x0c\n\x05\x04\x01\x02\0\x06\x12\
401    \x03\r\x02\r\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\r\x0e\x14\n\x0c\n\x05\
402    \x04\x01\x02\0\x03\x12\x03\r\x17\x18b\x06proto3\
403";
404
405static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
406
407fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
408    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
409}
410
411pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
412    unsafe {
413        file_descriptor_proto_lazy.get(|| {
414            parse_descriptor_proto()
415        })
416    }
417}