#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct SamplingConfig {
pub sampling_rate: f64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a SamplingConfig {
fn default() -> &'a SamplingConfig {
<SamplingConfig as ::protobuf::Message>::default_instance()
}
}
impl SamplingConfig {
pub fn new() -> SamplingConfig {
::std::default::Default::default()
}
pub fn get_sampling_rate(&self) -> f64 {
self.sampling_rate
}
pub fn clear_sampling_rate(&mut self) {
self.sampling_rate = 0.;
}
pub fn set_sampling_rate(&mut self, v: f64) {
self.sampling_rate = v;
}
}
impl ::protobuf::Message for SamplingConfig {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_double()?;
self.sampling_rate = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.sampling_rate != 0. {
my_size += 9;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.sampling_rate != 0. {
os.write_double(1, self.sampling_rate)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> SamplingConfig {
SamplingConfig::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
"sampling_rate",
|m: &SamplingConfig| { &m.sampling_rate },
|m: &mut SamplingConfig| { &mut m.sampling_rate },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<SamplingConfig>(
"SamplingConfig",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static SamplingConfig {
static mut instance: ::protobuf::lazy::Lazy<SamplingConfig> = ::protobuf::lazy::Lazy::INIT;
unsafe {
instance.get(SamplingConfig::new)
}
}
}
impl ::protobuf::Clear for SamplingConfig {
fn clear(&mut self) {
self.sampling_rate = 0.;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for SamplingConfig {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SamplingConfig {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct LoggingConfig {
pub log_collector_config: ::protobuf::SingularPtrField<super::log_collector_config::LogCollectorConfig>,
pub sampling_config: ::protobuf::SingularPtrField<SamplingConfig>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoggingConfig {
fn default() -> &'a LoggingConfig {
<LoggingConfig as ::protobuf::Message>::default_instance()
}
}
impl LoggingConfig {
pub fn new() -> LoggingConfig {
::std::default::Default::default()
}
pub fn get_log_collector_config(&self) -> &super::log_collector_config::LogCollectorConfig {
self.log_collector_config.as_ref().unwrap_or_else(|| super::log_collector_config::LogCollectorConfig::default_instance())
}
pub fn clear_log_collector_config(&mut self) {
self.log_collector_config.clear();
}
pub fn has_log_collector_config(&self) -> bool {
self.log_collector_config.is_some()
}
pub fn set_log_collector_config(&mut self, v: super::log_collector_config::LogCollectorConfig) {
self.log_collector_config = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_log_collector_config(&mut self) -> &mut super::log_collector_config::LogCollectorConfig {
if self.log_collector_config.is_none() {
self.log_collector_config.set_default();
}
self.log_collector_config.as_mut().unwrap()
}
pub fn take_log_collector_config(&mut self) -> super::log_collector_config::LogCollectorConfig {
self.log_collector_config.take().unwrap_or_else(|| super::log_collector_config::LogCollectorConfig::new())
}
pub fn get_sampling_config(&self) -> &SamplingConfig {
self.sampling_config.as_ref().unwrap_or_else(|| SamplingConfig::default_instance())
}
pub fn clear_sampling_config(&mut self) {
self.sampling_config.clear();
}
pub fn has_sampling_config(&self) -> bool {
self.sampling_config.is_some()
}
pub fn set_sampling_config(&mut self, v: SamplingConfig) {
self.sampling_config = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_sampling_config(&mut self) -> &mut SamplingConfig {
if self.sampling_config.is_none() {
self.sampling_config.set_default();
}
self.sampling_config.as_mut().unwrap()
}
pub fn take_sampling_config(&mut self) -> SamplingConfig {
self.sampling_config.take().unwrap_or_else(|| SamplingConfig::new())
}
}
impl ::protobuf::Message for LoggingConfig {
fn is_initialized(&self) -> bool {
for v in &self.log_collector_config {
if !v.is_initialized() {
return false;
}
};
for v in &self.sampling_config {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.log_collector_config)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sampling_config)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.log_collector_config.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.sampling_config.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.log_collector_config.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.sampling_config.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoggingConfig {
LoggingConfig::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::log_collector_config::LogCollectorConfig>>(
"log_collector_config",
|m: &LoggingConfig| { &m.log_collector_config },
|m: &mut LoggingConfig| { &mut m.log_collector_config },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<SamplingConfig>>(
"sampling_config",
|m: &LoggingConfig| { &m.sampling_config },
|m: &mut LoggingConfig| { &mut m.sampling_config },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<LoggingConfig>(
"LoggingConfig",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static LoggingConfig {
static mut instance: ::protobuf::lazy::Lazy<LoggingConfig> = ::protobuf::lazy::Lazy::INIT;
unsafe {
instance.get(LoggingConfig::new)
}
}
}
impl ::protobuf::Clear for LoggingConfig {
fn clear(&mut self) {
self.log_collector_config.clear();
self.sampling_config.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoggingConfig {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for LoggingConfig {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n.tensorflow_serving/config/logging_config.proto\x12\x12tensorflow.serv\
ing\x1a4tensorflow_serving/config/log_collector_config.proto\"5\n\x0eSam\
plingConfig\x12#\n\rsampling_rate\x18\x01\x20\x01(\x01R\x0csamplingRate\
\"\xb6\x01\n\rLoggingConfig\x12X\n\x14log_collector_config\x18\x01\x20\
\x01(\x0b2&.tensorflow.serving.LogCollectorConfigR\x12logCollectorConfig\
\x12K\n\x0fsampling_config\x18\x02\x20\x01(\x0b2\".tensorflow.serving.Sa\
mplingConfigR\x0esamplingConfigB\x03\xf8\x01\x01J\x9d\x03\n\x06\x12\x04\
\0\0\x11\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\
\0\x1b\n\x08\n\x01\x08\x12\x03\x03\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x03\0\
\x1f\n\t\n\x02\x03\0\x12\x03\x05\0>\n\n\n\x02\x04\0\x12\x04\x07\0\x0b\
\x01\n\n\n\x03\x04\0\x01\x12\x03\x07\x08\x16\ni\n\x04\x04\0\x02\0\x12\
\x03\n\x02\x1b\x1a\\\x20Requests\x20will\x20be\x20logged\x20uniformly\
\x20at\x20random\x20with\x20this\x20probability.\x20Valid\n\x20range:\
\x20[0,\x201.0].\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\n\x02\x08\n\x0c\n\
\x05\x04\0\x02\0\x01\x12\x03\n\t\x16\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\
\n\x19\x1a\n8\n\x02\x04\x01\x12\x04\x0e\0\x11\x01\x1a,\x20Configuration\
\x20for\x20logging\x20query/responses.\n\n\n\n\x03\x04\x01\x01\x12\x03\
\x0e\x08\x15\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x0f\x02.\n\x0c\n\x05\x04\
\x01\x02\0\x06\x12\x03\x0f\x02\x14\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\
\x0f\x15)\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0f,-\n\x0b\n\x04\x04\
\x01\x02\x01\x12\x03\x10\x02%\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\
\x10\x02\x10\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x10\x11\x20\n\x0c\n\
\x05\x04\x01\x02\x01\x03\x12\x03\x10#$b\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}