tensorflow_serving_client/
log_collector_config.rs1#![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)]
20use protobuf::Message as Message_imported_for_functions;
23use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25#[derive(PartialEq,Clone,Default)]
30pub struct LogCollectorConfig {
31 pub field_type: ::std::string::String,
33 pub filename_prefix: ::std::string::String,
34 pub unknown_fields: ::protobuf::UnknownFields,
36 pub cached_size: ::protobuf::CachedSize,
37}
38
39impl<'a> ::std::default::Default for &'a LogCollectorConfig {
40 fn default() -> &'a LogCollectorConfig {
41 <LogCollectorConfig as ::protobuf::Message>::default_instance()
42 }
43}
44
45impl LogCollectorConfig {
46 pub fn new() -> LogCollectorConfig {
47 ::std::default::Default::default()
48 }
49
50 pub fn get_field_type(&self) -> &str {
54 &self.field_type
55 }
56 pub fn clear_field_type(&mut self) {
57 self.field_type.clear();
58 }
59
60 pub fn set_field_type(&mut self, v: ::std::string::String) {
62 self.field_type = v;
63 }
64
65 pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
68 &mut self.field_type
69 }
70
71 pub fn take_field_type(&mut self) -> ::std::string::String {
73 ::std::mem::replace(&mut self.field_type, ::std::string::String::new())
74 }
75
76 pub fn get_filename_prefix(&self) -> &str {
80 &self.filename_prefix
81 }
82 pub fn clear_filename_prefix(&mut self) {
83 self.filename_prefix.clear();
84 }
85
86 pub fn set_filename_prefix(&mut self, v: ::std::string::String) {
88 self.filename_prefix = v;
89 }
90
91 pub fn mut_filename_prefix(&mut self) -> &mut ::std::string::String {
94 &mut self.filename_prefix
95 }
96
97 pub fn take_filename_prefix(&mut self) -> ::std::string::String {
99 ::std::mem::replace(&mut self.filename_prefix, ::std::string::String::new())
100 }
101}
102
103impl ::protobuf::Message for LogCollectorConfig {
104 fn is_initialized(&self) -> bool {
105 true
106 }
107
108 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
109 while !is.eof()? {
110 let (field_number, wire_type) = is.read_tag_unpack()?;
111 match field_number {
112 1 => {
113 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
114 },
115 2 => {
116 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.filename_prefix)?;
117 },
118 _ => {
119 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
120 },
121 };
122 }
123 ::std::result::Result::Ok(())
124 }
125
126 #[allow(unused_variables)]
128 fn compute_size(&self) -> u32 {
129 let mut my_size = 0;
130 if !self.field_type.is_empty() {
131 my_size += ::protobuf::rt::string_size(1, &self.field_type);
132 }
133 if !self.filename_prefix.is_empty() {
134 my_size += ::protobuf::rt::string_size(2, &self.filename_prefix);
135 }
136 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
137 self.cached_size.set(my_size);
138 my_size
139 }
140
141 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
142 if !self.field_type.is_empty() {
143 os.write_string(1, &self.field_type)?;
144 }
145 if !self.filename_prefix.is_empty() {
146 os.write_string(2, &self.filename_prefix)?;
147 }
148 os.write_unknown_fields(self.get_unknown_fields())?;
149 ::std::result::Result::Ok(())
150 }
151
152 fn get_cached_size(&self) -> u32 {
153 self.cached_size.get()
154 }
155
156 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
157 &self.unknown_fields
158 }
159
160 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
161 &mut self.unknown_fields
162 }
163
164 fn as_any(&self) -> &dyn (::std::any::Any) {
165 self as &dyn (::std::any::Any)
166 }
167 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
168 self as &mut dyn (::std::any::Any)
169 }
170 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
171 self
172 }
173
174 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
175 Self::descriptor_static()
176 }
177
178 fn new() -> LogCollectorConfig {
179 LogCollectorConfig::new()
180 }
181
182 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
183 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
184 unsafe {
185 descriptor.get(|| {
186 let mut fields = ::std::vec::Vec::new();
187 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
188 "type",
189 |m: &LogCollectorConfig| { &m.field_type },
190 |m: &mut LogCollectorConfig| { &mut m.field_type },
191 ));
192 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
193 "filename_prefix",
194 |m: &LogCollectorConfig| { &m.filename_prefix },
195 |m: &mut LogCollectorConfig| { &mut m.filename_prefix },
196 ));
197 ::protobuf::reflect::MessageDescriptor::new_pb_name::<LogCollectorConfig>(
198 "LogCollectorConfig",
199 fields,
200 file_descriptor_proto()
201 )
202 })
203 }
204 }
205
206 fn default_instance() -> &'static LogCollectorConfig {
207 static mut instance: ::protobuf::lazy::Lazy<LogCollectorConfig> = ::protobuf::lazy::Lazy::INIT;
208 unsafe {
209 instance.get(LogCollectorConfig::new)
210 }
211 }
212}
213
214impl ::protobuf::Clear for LogCollectorConfig {
215 fn clear(&mut self) {
216 self.field_type.clear();
217 self.filename_prefix.clear();
218 self.unknown_fields.clear();
219 }
220}
221
222impl ::std::fmt::Debug for LogCollectorConfig {
223 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
224 ::protobuf::text_format::fmt(self, f)
225 }
226}
227
228impl ::protobuf::reflect::ProtobufValue for LogCollectorConfig {
229 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
230 ::protobuf::reflect::ReflectValueRef::Message(self)
231 }
232}
233
234static file_descriptor_proto_data: &'static [u8] = b"\
235 \n4tensorflow_serving/config/log_collector_config.proto\x12\x12tensorflo\
236 w.serving\"Q\n\x12LogCollectorConfig\x12\x12\n\x04type\x18\x01\x20\x01(\
237 \tR\x04type\x12'\n\x0ffilename_prefix\x18\x02\x20\x01(\tR\x0efilenamePre\
238 fixB\x03\xf8\x01\x01J\xb9\x02\n\x06\x12\x04\0\0\x0b\x01\n\x08\n\x01\x0c\
239 \x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x1b\n\x08\n\x01\x08\x12\
240 \x03\x03\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x03\0\x1f\n\n\n\x02\x04\0\x12\
241 \x04\x05\0\x0b\x01\n\n\n\x03\x04\0\x01\x12\x03\x05\x08\x1a\nY\n\x04\x04\
242 \0\x02\0\x12\x03\x07\x02\x12\x1aL\x20Identifies\x20the\x20type\x20of\x20\
243 the\x20LogCollector\x20we\x20will\x20use\x20to\x20collect\x20these\x20lo\
244 gs.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x07\x02\x08\n\x0c\n\x05\x04\0\
245 \x02\0\x01\x12\x03\x07\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x07\x10\
246 \x11\n?\n\x04\x04\0\x02\x01\x12\x03\n\x02\x1d\x1a2\x20The\x20prefix\x20t\
247 o\x20use\x20for\x20the\x20filenames\x20of\x20the\x20logs.\n\n\x0c\n\x05\
248 \x04\0\x02\x01\x05\x12\x03\n\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\
249 \x03\n\t\x18\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\n\x1b\x1cb\x06proto3\
250";
251
252static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
253
254fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
255 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
256}
257
258pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
259 unsafe {
260 file_descriptor_proto_lazy.get(|| {
261 parse_descriptor_proto()
262 })
263 }
264}