tensorflow_serving_client/
verifier_config.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/protobuf/verifier_config.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 VerifierConfig {
31    // message fields
32    pub verification_timeout_in_ms: i64,
33    pub structure_verifier: VerifierConfig_Toggle,
34    // special fields
35    pub unknown_fields: ::protobuf::UnknownFields,
36    pub cached_size: ::protobuf::CachedSize,
37}
38
39impl<'a> ::std::default::Default for &'a VerifierConfig {
40    fn default() -> &'a VerifierConfig {
41        <VerifierConfig as ::protobuf::Message>::default_instance()
42    }
43}
44
45impl VerifierConfig {
46    pub fn new() -> VerifierConfig {
47        ::std::default::Default::default()
48    }
49
50    // int64 verification_timeout_in_ms = 1;
51
52
53    pub fn get_verification_timeout_in_ms(&self) -> i64 {
54        self.verification_timeout_in_ms
55    }
56    pub fn clear_verification_timeout_in_ms(&mut self) {
57        self.verification_timeout_in_ms = 0;
58    }
59
60    // Param is passed by value, moved
61    pub fn set_verification_timeout_in_ms(&mut self, v: i64) {
62        self.verification_timeout_in_ms = v;
63    }
64
65    // .tensorflow.VerifierConfig.Toggle structure_verifier = 2;
66
67
68    pub fn get_structure_verifier(&self) -> VerifierConfig_Toggle {
69        self.structure_verifier
70    }
71    pub fn clear_structure_verifier(&mut self) {
72        self.structure_verifier = VerifierConfig_Toggle::DEFAULT;
73    }
74
75    // Param is passed by value, moved
76    pub fn set_structure_verifier(&mut self, v: VerifierConfig_Toggle) {
77        self.structure_verifier = v;
78    }
79}
80
81impl ::protobuf::Message for VerifierConfig {
82    fn is_initialized(&self) -> bool {
83        true
84    }
85
86    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
87        while !is.eof()? {
88            let (field_number, wire_type) = is.read_tag_unpack()?;
89            match field_number {
90                1 => {
91                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
92                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
93                    }
94                    let tmp = is.read_int64()?;
95                    self.verification_timeout_in_ms = tmp;
96                },
97                2 => {
98                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.structure_verifier, 2, &mut self.unknown_fields)?
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 self.verification_timeout_in_ms != 0 {
113            my_size += ::protobuf::rt::value_size(1, self.verification_timeout_in_ms, ::protobuf::wire_format::WireTypeVarint);
114        }
115        if self.structure_verifier != VerifierConfig_Toggle::DEFAULT {
116            my_size += ::protobuf::rt::enum_size(2, self.structure_verifier);
117        }
118        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
119        self.cached_size.set(my_size);
120        my_size
121    }
122
123    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
124        if self.verification_timeout_in_ms != 0 {
125            os.write_int64(1, self.verification_timeout_in_ms)?;
126        }
127        if self.structure_verifier != VerifierConfig_Toggle::DEFAULT {
128            os.write_enum(2, self.structure_verifier.value())?;
129        }
130        os.write_unknown_fields(self.get_unknown_fields())?;
131        ::std::result::Result::Ok(())
132    }
133
134    fn get_cached_size(&self) -> u32 {
135        self.cached_size.get()
136    }
137
138    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
139        &self.unknown_fields
140    }
141
142    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
143        &mut self.unknown_fields
144    }
145
146    fn as_any(&self) -> &dyn (::std::any::Any) {
147        self as &dyn (::std::any::Any)
148    }
149    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
150        self as &mut dyn (::std::any::Any)
151    }
152    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
153        self
154    }
155
156    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
157        Self::descriptor_static()
158    }
159
160    fn new() -> VerifierConfig {
161        VerifierConfig::new()
162    }
163
164    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
165        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
166        unsafe {
167            descriptor.get(|| {
168                let mut fields = ::std::vec::Vec::new();
169                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
170                    "verification_timeout_in_ms",
171                    |m: &VerifierConfig| { &m.verification_timeout_in_ms },
172                    |m: &mut VerifierConfig| { &mut m.verification_timeout_in_ms },
173                ));
174                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<VerifierConfig_Toggle>>(
175                    "structure_verifier",
176                    |m: &VerifierConfig| { &m.structure_verifier },
177                    |m: &mut VerifierConfig| { &mut m.structure_verifier },
178                ));
179                ::protobuf::reflect::MessageDescriptor::new_pb_name::<VerifierConfig>(
180                    "VerifierConfig",
181                    fields,
182                    file_descriptor_proto()
183                )
184            })
185        }
186    }
187
188    fn default_instance() -> &'static VerifierConfig {
189        static mut instance: ::protobuf::lazy::Lazy<VerifierConfig> = ::protobuf::lazy::Lazy::INIT;
190        unsafe {
191            instance.get(VerifierConfig::new)
192        }
193    }
194}
195
196impl ::protobuf::Clear for VerifierConfig {
197    fn clear(&mut self) {
198        self.verification_timeout_in_ms = 0;
199        self.structure_verifier = VerifierConfig_Toggle::DEFAULT;
200        self.unknown_fields.clear();
201    }
202}
203
204impl ::std::fmt::Debug for VerifierConfig {
205    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
206        ::protobuf::text_format::fmt(self, f)
207    }
208}
209
210impl ::protobuf::reflect::ProtobufValue for VerifierConfig {
211    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
212        ::protobuf::reflect::ReflectValueRef::Message(self)
213    }
214}
215
216#[derive(Clone,PartialEq,Eq,Debug,Hash)]
217pub enum VerifierConfig_Toggle {
218    DEFAULT = 0,
219    ON = 1,
220    OFF = 2,
221}
222
223impl ::protobuf::ProtobufEnum for VerifierConfig_Toggle {
224    fn value(&self) -> i32 {
225        *self as i32
226    }
227
228    fn from_i32(value: i32) -> ::std::option::Option<VerifierConfig_Toggle> {
229        match value {
230            0 => ::std::option::Option::Some(VerifierConfig_Toggle::DEFAULT),
231            1 => ::std::option::Option::Some(VerifierConfig_Toggle::ON),
232            2 => ::std::option::Option::Some(VerifierConfig_Toggle::OFF),
233            _ => ::std::option::Option::None
234        }
235    }
236
237    fn values() -> &'static [Self] {
238        static values: &'static [VerifierConfig_Toggle] = &[
239            VerifierConfig_Toggle::DEFAULT,
240            VerifierConfig_Toggle::ON,
241            VerifierConfig_Toggle::OFF,
242        ];
243        values
244    }
245
246    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
247        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT;
248        unsafe {
249            descriptor.get(|| {
250                ::protobuf::reflect::EnumDescriptor::new_pb_name::<VerifierConfig_Toggle>("VerifierConfig.Toggle", file_descriptor_proto())
251            })
252        }
253    }
254}
255
256impl ::std::marker::Copy for VerifierConfig_Toggle {
257}
258
259impl ::std::default::Default for VerifierConfig_Toggle {
260    fn default() -> Self {
261        VerifierConfig_Toggle::DEFAULT
262    }
263}
264
265impl ::protobuf::reflect::ProtobufValue for VerifierConfig_Toggle {
266    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
267        ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
268    }
269}
270
271static file_descriptor_proto_data: &'static [u8] = b"\
272    \n.tensorflow/core/protobuf/verifier_config.proto\x12\ntensorflow\"\xc7\
273    \x01\n\x0eVerifierConfig\x12;\n\x1averification_timeout_in_ms\x18\x01\
274    \x20\x01(\x03R\x17verificationTimeoutInMs\x12P\n\x12structure_verifier\
275    \x18\x02\x20\x01(\x0e2!.tensorflow.VerifierConfig.ToggleR\x11structureVe\
276    rifier\"&\n\x06Toggle\x12\x0b\n\x07DEFAULT\x10\0\x12\x06\n\x02ON\x10\x01\
277    \x12\x07\n\x03OFF\x10\x02B\x7f\n\x18org.tensorflow.frameworkB\x14Verifie\
278    rConfigProtosP\x01ZHgithub.com/tensorflow/tensorflow/tensorflow/go/core/\
279    core_protos_go_proto\xf8\x01\x01J\x9b\x05\n\x06\x12\x04\0\0\x1a\x01\n\
280    \x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x13\n\x08\n\
281    \x01\x08\x12\x03\x04\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x04\0\x1f\n\x08\n\
282    \x01\x08\x12\x03\x05\05\n\t\n\x02\x08\x08\x12\x03\x05\05\n\x08\n\x01\x08\
283    \x12\x03\x06\0\"\n\t\n\x02\x08\n\x12\x03\x06\0\"\n\x08\n\x01\x08\x12\x03\
284    \x07\01\n\t\n\x02\x08\x01\x12\x03\x07\01\n\x08\n\x01\x08\x12\x03\x08\0_\
285    \n\t\n\x02\x08\x0b\x12\x03\x08\0_\n-\n\x02\x04\0\x12\x04\x0b\0\x1a\x01\
286    \x1a!\x20The\x20config\x20for\x20graph\x20verifiers.\n\n\n\n\x03\x04\0\
287    \x01\x12\x03\x0b\x08\x16\n\x0c\n\x04\x04\0\x04\0\x12\x04\x0c\x02\x10\x03\
288    \n\x0c\n\x05\x04\0\x04\0\x01\x12\x03\x0c\x07\r\n\r\n\x06\x04\0\x04\0\x02\
289    \0\x12\x03\r\x04\x10\n\x0e\n\x07\x04\0\x04\0\x02\0\x01\x12\x03\r\x04\x0b\
290    \n\x0e\n\x07\x04\0\x04\0\x02\0\x02\x12\x03\r\x0e\x0f\n\r\n\x06\x04\0\x04\
291    \0\x02\x01\x12\x03\x0e\x04\x0b\n\x0e\n\x07\x04\0\x04\0\x02\x01\x01\x12\
292    \x03\x0e\x04\x06\n\x0e\n\x07\x04\0\x04\0\x02\x01\x02\x12\x03\x0e\t\n\n\r\
293    \n\x06\x04\0\x04\0\x02\x02\x12\x03\x0f\x04\x0c\n\x0e\n\x07\x04\0\x04\0\
294    \x02\x02\x01\x12\x03\x0f\x04\x07\n\x0e\n\x07\x04\0\x04\0\x02\x02\x02\x12\
295    \x03\x0f\n\x0b\n\x86\x01\n\x04\x04\0\x02\0\x12\x03\x14\x02'\x1ay\x20Dead\
296    line\x20for\x20completion\x20of\x20all\x20verification\x20i.e.\x20all\
297    \x20the\x20Toggle\x20ON\n\x20verifiers\x20must\x20complete\x20execution\
298    \x20within\x20this\x20time.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x14\
299    \x02\x07\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x14\x08\"\n\x0c\n\x05\x04\0\
300    \x02\0\x03\x12\x03\x14%&\nS\n\x04\x04\0\x02\x01\x12\x03\x17\x02\x20\x1aF\
301    \x20Perform\x20structural\x20validation\x20on\x20a\x20tensorflow\x20grap\
302    h.\x20Default\x20is\x20OFF.\n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x17\
303    \x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x17\t\x1b\n\x0c\n\x05\x04\
304    \0\x02\x01\x03\x12\x03\x17\x1e\x1fb\x06proto3\
305";
306
307static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
308
309fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
310    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
311}
312
313pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
314    unsafe {
315        file_descriptor_proto_lazy.get(|| {
316            parse_descriptor_proto()
317        })
318    }
319}