#![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 JobDef {
pub name: ::std::string::String,
pub tasks: ::std::collections::HashMap<i32, ::std::string::String>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a JobDef {
fn default() -> &'a JobDef {
<JobDef as ::protobuf::Message>::default_instance()
}
}
impl JobDef {
pub fn new() -> JobDef {
::std::default::Default::default()
}
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
pub fn get_tasks(&self) -> &::std::collections::HashMap<i32, ::std::string::String> {
&self.tasks
}
pub fn clear_tasks(&mut self) {
self.tasks.clear();
}
pub fn set_tasks(&mut self, v: ::std::collections::HashMap<i32, ::std::string::String>) {
self.tasks = v;
}
pub fn mut_tasks(&mut self) -> &mut ::std::collections::HashMap<i32, ::std::string::String> {
&mut self.tasks
}
pub fn take_tasks(&mut self) -> ::std::collections::HashMap<i32, ::std::string::String> {
::std::mem::replace(&mut self.tasks, ::std::collections::HashMap::new())
}
}
impl ::protobuf::Message for JobDef {
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.name)?;
},
2 => {
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeInt32, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.tasks)?;
},
_ => {
::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.name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.name);
}
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeInt32, ::protobuf::types::ProtobufTypeString>(2, &self.tasks);
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.name.is_empty() {
os.write_string(1, &self.name)?;
}
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeInt32, ::protobuf::types::ProtobufTypeString>(2, &self.tasks, 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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> JobDef {
JobDef::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>(
"name",
|m: &JobDef| { &m.name },
|m: &mut JobDef| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeInt32, ::protobuf::types::ProtobufTypeString>(
"tasks",
|m: &JobDef| { &m.tasks },
|m: &mut JobDef| { &mut m.tasks },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<JobDef>(
"JobDef",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static JobDef {
static instance: ::protobuf::rt::LazyV2<JobDef> = ::protobuf::rt::LazyV2::INIT;
instance.get(JobDef::new)
}
}
impl ::protobuf::Clear for JobDef {
fn clear(&mut self) {
self.name.clear();
self.tasks.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for JobDef {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for JobDef {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct ClusterDef {
pub job: ::protobuf::RepeatedField<JobDef>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ClusterDef {
fn default() -> &'a ClusterDef {
<ClusterDef as ::protobuf::Message>::default_instance()
}
}
impl ClusterDef {
pub fn new() -> ClusterDef {
::std::default::Default::default()
}
pub fn get_job(&self) -> &[JobDef] {
&self.job
}
pub fn clear_job(&mut self) {
self.job.clear();
}
pub fn set_job(&mut self, v: ::protobuf::RepeatedField<JobDef>) {
self.job = v;
}
pub fn mut_job(&mut self) -> &mut ::protobuf::RepeatedField<JobDef> {
&mut self.job
}
pub fn take_job(&mut self) -> ::protobuf::RepeatedField<JobDef> {
::std::mem::replace(&mut self.job, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for ClusterDef {
fn is_initialized(&self) -> bool {
for v in &self.job {
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_repeated_message_into(wire_type, is, &mut self.job)?;
},
_ => {
::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;
for value in &self.job {
let len = value.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<()> {
for v in &self.job {
os.write_tag(1, ::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: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ClusterDef {
ClusterDef::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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<JobDef>>(
"job",
|m: &ClusterDef| { &m.job },
|m: &mut ClusterDef| { &mut m.job },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<ClusterDef>(
"ClusterDef",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static ClusterDef {
static instance: ::protobuf::rt::LazyV2<ClusterDef> = ::protobuf::rt::LazyV2::INIT;
instance.get(ClusterDef::new)
}
}
impl ::protobuf::Clear for ClusterDef {
fn clear(&mut self) {
self.job.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ClusterDef {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ClusterDef {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n&tensorflow/core/protobuf/cluster.proto\x12\ntensorflow\"\x8b\x01\n\
\x06JobDef\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x123\n\x05tasks\
\x18\x02\x20\x03(\x0b2\x1d.tensorflow.JobDef.TasksEntryR\x05tasks\x1a8\n\
\nTasksEntry\x12\x10\n\x03key\x18\x01\x20\x01(\x05R\x03key\x12\x14\n\x05\
value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"2\n\nClusterDef\x12$\n\x03\
job\x18\x01\x20\x03(\x0b2\x12.tensorflow.JobDefR\x03jobB\x87\x01\n\x1aor\
g.tensorflow.distruntimeB\rClusterProtosP\x01ZUgithub.com/tensorflow/ten\
sorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto\xf8\x01\x01\
b\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()
})
}