#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![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(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct CoordinationServiceConfig {
pub service_type: ::std::string::String,
pub service_leader: ::std::string::String,
pub enable_health_check: bool,
pub cluster_register_timeout_in_ms: i64,
pub heartbeat_timeout_in_ms: i64,
pub coordinated_jobs: ::protobuf::RepeatedField<::std::string::String>,
pub shutdown_barrier_timeout_in_ms: i64,
pub agent_destruction_without_shutdown: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CoordinationServiceConfig {
fn default() -> &'a CoordinationServiceConfig {
<CoordinationServiceConfig as ::protobuf::Message>::default_instance()
}
}
impl CoordinationServiceConfig {
pub fn new() -> CoordinationServiceConfig {
::std::default::Default::default()
}
pub fn get_service_type(&self) -> &str {
&self.service_type
}
pub fn clear_service_type(&mut self) {
self.service_type.clear();
}
pub fn set_service_type(&mut self, v: ::std::string::String) {
self.service_type = v;
}
pub fn mut_service_type(&mut self) -> &mut ::std::string::String {
&mut self.service_type
}
pub fn take_service_type(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_type, ::std::string::String::new())
}
pub fn get_service_leader(&self) -> &str {
&self.service_leader
}
pub fn clear_service_leader(&mut self) {
self.service_leader.clear();
}
pub fn set_service_leader(&mut self, v: ::std::string::String) {
self.service_leader = v;
}
pub fn mut_service_leader(&mut self) -> &mut ::std::string::String {
&mut self.service_leader
}
pub fn take_service_leader(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_leader, ::std::string::String::new())
}
pub fn get_enable_health_check(&self) -> bool {
self.enable_health_check
}
pub fn clear_enable_health_check(&mut self) {
self.enable_health_check = false;
}
pub fn set_enable_health_check(&mut self, v: bool) {
self.enable_health_check = v;
}
pub fn get_cluster_register_timeout_in_ms(&self) -> i64 {
self.cluster_register_timeout_in_ms
}
pub fn clear_cluster_register_timeout_in_ms(&mut self) {
self.cluster_register_timeout_in_ms = 0;
}
pub fn set_cluster_register_timeout_in_ms(&mut self, v: i64) {
self.cluster_register_timeout_in_ms = v;
}
pub fn get_heartbeat_timeout_in_ms(&self) -> i64 {
self.heartbeat_timeout_in_ms
}
pub fn clear_heartbeat_timeout_in_ms(&mut self) {
self.heartbeat_timeout_in_ms = 0;
}
pub fn set_heartbeat_timeout_in_ms(&mut self, v: i64) {
self.heartbeat_timeout_in_ms = v;
}
pub fn get_coordinated_jobs(&self) -> &[::std::string::String] {
&self.coordinated_jobs
}
pub fn clear_coordinated_jobs(&mut self) {
self.coordinated_jobs.clear();
}
pub fn set_coordinated_jobs(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
self.coordinated_jobs = v;
}
pub fn mut_coordinated_jobs(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
&mut self.coordinated_jobs
}
pub fn take_coordinated_jobs(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
::std::mem::replace(&mut self.coordinated_jobs, ::protobuf::RepeatedField::new())
}
pub fn get_shutdown_barrier_timeout_in_ms(&self) -> i64 {
self.shutdown_barrier_timeout_in_ms
}
pub fn clear_shutdown_barrier_timeout_in_ms(&mut self) {
self.shutdown_barrier_timeout_in_ms = 0;
}
pub fn set_shutdown_barrier_timeout_in_ms(&mut self, v: i64) {
self.shutdown_barrier_timeout_in_ms = v;
}
pub fn get_agent_destruction_without_shutdown(&self) -> bool {
self.agent_destruction_without_shutdown
}
pub fn clear_agent_destruction_without_shutdown(&mut self) {
self.agent_destruction_without_shutdown = false;
}
pub fn set_agent_destruction_without_shutdown(&mut self, v: bool) {
self.agent_destruction_without_shutdown = v;
}
}
impl ::protobuf::Message for CoordinationServiceConfig {
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 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_type)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_leader)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.enable_health_check = tmp;
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.cluster_register_timeout_in_ms = tmp;
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.heartbeat_timeout_in_ms = tmp;
},
6 => {
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.coordinated_jobs)?;
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.shutdown_barrier_timeout_in_ms = tmp;
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.agent_destruction_without_shutdown = 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.service_type.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.service_type);
}
if !self.service_leader.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.service_leader);
}
if self.enable_health_check != false {
my_size += 2;
}
if self.cluster_register_timeout_in_ms != 0 {
my_size += ::protobuf::rt::value_size(4, self.cluster_register_timeout_in_ms, ::protobuf::wire_format::WireTypeVarint);
}
if self.heartbeat_timeout_in_ms != 0 {
my_size += ::protobuf::rt::value_size(5, self.heartbeat_timeout_in_ms, ::protobuf::wire_format::WireTypeVarint);
}
for value in &self.coordinated_jobs {
my_size += ::protobuf::rt::string_size(6, &value);
};
if self.shutdown_barrier_timeout_in_ms != 0 {
my_size += ::protobuf::rt::value_size(7, self.shutdown_barrier_timeout_in_ms, ::protobuf::wire_format::WireTypeVarint);
}
if self.agent_destruction_without_shutdown != false {
my_size += 2;
}
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.service_type.is_empty() {
os.write_string(1, &self.service_type)?;
}
if !self.service_leader.is_empty() {
os.write_string(2, &self.service_leader)?;
}
if self.enable_health_check != false {
os.write_bool(3, self.enable_health_check)?;
}
if self.cluster_register_timeout_in_ms != 0 {
os.write_int64(4, self.cluster_register_timeout_in_ms)?;
}
if self.heartbeat_timeout_in_ms != 0 {
os.write_int64(5, self.heartbeat_timeout_in_ms)?;
}
for v in &self.coordinated_jobs {
os.write_string(6, &v)?;
};
if self.shutdown_barrier_timeout_in_ms != 0 {
os.write_int64(7, self.shutdown_barrier_timeout_in_ms)?;
}
if self.agent_destruction_without_shutdown != false {
os.write_bool(8, self.agent_destruction_without_shutdown)?;
}
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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CoordinationServiceConfig {
CoordinationServiceConfig::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_type",
|m: &CoordinationServiceConfig| { &m.service_type },
|m: &mut CoordinationServiceConfig| { &mut m.service_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_leader",
|m: &CoordinationServiceConfig| { &m.service_leader },
|m: &mut CoordinationServiceConfig| { &mut m.service_leader },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"enable_health_check",
|m: &CoordinationServiceConfig| { &m.enable_health_check },
|m: &mut CoordinationServiceConfig| { &mut m.enable_health_check },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"cluster_register_timeout_in_ms",
|m: &CoordinationServiceConfig| { &m.cluster_register_timeout_in_ms },
|m: &mut CoordinationServiceConfig| { &mut m.cluster_register_timeout_in_ms },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"heartbeat_timeout_in_ms",
|m: &CoordinationServiceConfig| { &m.heartbeat_timeout_in_ms },
|m: &mut CoordinationServiceConfig| { &mut m.heartbeat_timeout_in_ms },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"coordinated_jobs",
|m: &CoordinationServiceConfig| { &m.coordinated_jobs },
|m: &mut CoordinationServiceConfig| { &mut m.coordinated_jobs },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"shutdown_barrier_timeout_in_ms",
|m: &CoordinationServiceConfig| { &m.shutdown_barrier_timeout_in_ms },
|m: &mut CoordinationServiceConfig| { &mut m.shutdown_barrier_timeout_in_ms },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"agent_destruction_without_shutdown",
|m: &CoordinationServiceConfig| { &m.agent_destruction_without_shutdown },
|m: &mut CoordinationServiceConfig| { &mut m.agent_destruction_without_shutdown },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<CoordinationServiceConfig>(
"CoordinationServiceConfig",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static CoordinationServiceConfig {
static instance: ::protobuf::rt::LazyV2<CoordinationServiceConfig> = ::protobuf::rt::LazyV2::INIT;
instance.get(CoordinationServiceConfig::new)
}
}
impl ::protobuf::Clear for CoordinationServiceConfig {
fn clear(&mut self) {
self.service_type.clear();
self.service_leader.clear();
self.enable_health_check = false;
self.cluster_register_timeout_in_ms = 0;
self.heartbeat_timeout_in_ms = 0;
self.coordinated_jobs.clear();
self.shutdown_barrier_timeout_in_ms = 0;
self.agent_destruction_without_shutdown = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CoordinationServiceConfig {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CoordinationServiceConfig {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n2tensorflow/core/protobuf/coordination_config.proto\x12\ntensorflow\"\
\xcc\x03\n\x19CoordinationServiceConfig\x12!\n\x0cservice_type\x18\x01\
\x20\x01(\tR\x0bserviceType\x12%\n\x0eservice_leader\x18\x02\x20\x01(\tR\
\rserviceLeader\x12.\n\x13enable_health_check\x18\x03\x20\x01(\x08R\x11e\
nableHealthCheck\x12B\n\x1ecluster_register_timeout_in_ms\x18\x04\x20\
\x01(\x03R\x1aclusterRegisterTimeoutInMs\x125\n\x17heartbeat_timeout_in_\
ms\x18\x05\x20\x01(\x03R\x14heartbeatTimeoutInMs\x12)\n\x10coordinated_j\
obs\x18\x06\x20\x03(\tR\x0fcoordinatedJobs\x12B\n\x1eshutdown_barrier_ti\
meout_in_ms\x18\x07\x20\x01(\x03R\x1ashutdownBarrierTimeoutInMs\x12K\n\"\
agent_destruction_without_shutdown\x18\x08\x20\x01(\x08R\x1fagentDestruc\
tionWithoutShutdownBWZUgithub.com/tensorflow/tensorflow/tensorflow/go/co\
re/protobuf/for_core_protos_go_protob\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}