tensorflow-protos-rs 0.2.0

Protobuf codegen crate for tensorflow
Documentation
// This file is generated by rust-protobuf 2.17.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![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)]
//! Generated file from `tensorflow/core/framework/api_def.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_17_0;

#[derive(PartialEq,Clone,Default)]
pub struct ApiDef {
    // message fields
    pub graph_op_name: ::std::string::String,
    pub deprecation_message: ::std::string::String,
    pub deprecation_version: i32,
    pub visibility: ApiDef_Visibility,
    pub endpoint: ::protobuf::RepeatedField<ApiDef_Endpoint>,
    pub in_arg: ::protobuf::RepeatedField<ApiDef_Arg>,
    pub out_arg: ::protobuf::RepeatedField<ApiDef_Arg>,
    pub arg_order: ::protobuf::RepeatedField<::std::string::String>,
    pub attr: ::protobuf::RepeatedField<ApiDef_Attr>,
    pub summary: ::std::string::String,
    pub description: ::std::string::String,
    pub description_prefix: ::std::string::String,
    pub description_suffix: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ApiDef {
    fn default() -> &'a ApiDef {
        <ApiDef as ::protobuf::Message>::default_instance()
    }
}

impl ApiDef {
    pub fn new() -> ApiDef {
        ::std::default::Default::default()
    }

    // string graph_op_name = 1;


    pub fn get_graph_op_name(&self) -> &str {
        &self.graph_op_name
    }
    pub fn clear_graph_op_name(&mut self) {
        self.graph_op_name.clear();
    }

    // Param is passed by value, moved
    pub fn set_graph_op_name(&mut self, v: ::std::string::String) {
        self.graph_op_name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_graph_op_name(&mut self) -> &mut ::std::string::String {
        &mut self.graph_op_name
    }

    // Take field
    pub fn take_graph_op_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.graph_op_name, ::std::string::String::new())
    }

    // string deprecation_message = 12;


    pub fn get_deprecation_message(&self) -> &str {
        &self.deprecation_message
    }
    pub fn clear_deprecation_message(&mut self) {
        self.deprecation_message.clear();
    }

    // Param is passed by value, moved
    pub fn set_deprecation_message(&mut self, v: ::std::string::String) {
        self.deprecation_message = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_deprecation_message(&mut self) -> &mut ::std::string::String {
        &mut self.deprecation_message
    }

    // Take field
    pub fn take_deprecation_message(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.deprecation_message, ::std::string::String::new())
    }

    // int32 deprecation_version = 13;


    pub fn get_deprecation_version(&self) -> i32 {
        self.deprecation_version
    }
    pub fn clear_deprecation_version(&mut self) {
        self.deprecation_version = 0;
    }

    // Param is passed by value, moved
    pub fn set_deprecation_version(&mut self, v: i32) {
        self.deprecation_version = v;
    }

    // .tensorflow.ApiDef.Visibility visibility = 2;


    pub fn get_visibility(&self) -> ApiDef_Visibility {
        self.visibility
    }
    pub fn clear_visibility(&mut self) {
        self.visibility = ApiDef_Visibility::DEFAULT_VISIBILITY;
    }

    // Param is passed by value, moved
    pub fn set_visibility(&mut self, v: ApiDef_Visibility) {
        self.visibility = v;
    }

    // repeated .tensorflow.ApiDef.Endpoint endpoint = 3;


    pub fn get_endpoint(&self) -> &[ApiDef_Endpoint] {
        &self.endpoint
    }
    pub fn clear_endpoint(&mut self) {
        self.endpoint.clear();
    }

    // Param is passed by value, moved
    pub fn set_endpoint(&mut self, v: ::protobuf::RepeatedField<ApiDef_Endpoint>) {
        self.endpoint = v;
    }

    // Mutable pointer to the field.
    pub fn mut_endpoint(&mut self) -> &mut ::protobuf::RepeatedField<ApiDef_Endpoint> {
        &mut self.endpoint
    }

    // Take field
    pub fn take_endpoint(&mut self) -> ::protobuf::RepeatedField<ApiDef_Endpoint> {
        ::std::mem::replace(&mut self.endpoint, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.ApiDef.Arg in_arg = 4;


    pub fn get_in_arg(&self) -> &[ApiDef_Arg] {
        &self.in_arg
    }
    pub fn clear_in_arg(&mut self) {
        self.in_arg.clear();
    }

    // Param is passed by value, moved
    pub fn set_in_arg(&mut self, v: ::protobuf::RepeatedField<ApiDef_Arg>) {
        self.in_arg = v;
    }

    // Mutable pointer to the field.
    pub fn mut_in_arg(&mut self) -> &mut ::protobuf::RepeatedField<ApiDef_Arg> {
        &mut self.in_arg
    }

    // Take field
    pub fn take_in_arg(&mut self) -> ::protobuf::RepeatedField<ApiDef_Arg> {
        ::std::mem::replace(&mut self.in_arg, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.ApiDef.Arg out_arg = 5;


    pub fn get_out_arg(&self) -> &[ApiDef_Arg] {
        &self.out_arg
    }
    pub fn clear_out_arg(&mut self) {
        self.out_arg.clear();
    }

    // Param is passed by value, moved
    pub fn set_out_arg(&mut self, v: ::protobuf::RepeatedField<ApiDef_Arg>) {
        self.out_arg = v;
    }

    // Mutable pointer to the field.
    pub fn mut_out_arg(&mut self) -> &mut ::protobuf::RepeatedField<ApiDef_Arg> {
        &mut self.out_arg
    }

    // Take field
    pub fn take_out_arg(&mut self) -> ::protobuf::RepeatedField<ApiDef_Arg> {
        ::std::mem::replace(&mut self.out_arg, ::protobuf::RepeatedField::new())
    }

    // repeated string arg_order = 11;


    pub fn get_arg_order(&self) -> &[::std::string::String] {
        &self.arg_order
    }
    pub fn clear_arg_order(&mut self) {
        self.arg_order.clear();
    }

    // Param is passed by value, moved
    pub fn set_arg_order(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
        self.arg_order = v;
    }

    // Mutable pointer to the field.
    pub fn mut_arg_order(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
        &mut self.arg_order
    }

    // Take field
    pub fn take_arg_order(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
        ::std::mem::replace(&mut self.arg_order, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.ApiDef.Attr attr = 6;


    pub fn get_attr(&self) -> &[ApiDef_Attr] {
        &self.attr
    }
    pub fn clear_attr(&mut self) {
        self.attr.clear();
    }

    // Param is passed by value, moved
    pub fn set_attr(&mut self, v: ::protobuf::RepeatedField<ApiDef_Attr>) {
        self.attr = v;
    }

    // Mutable pointer to the field.
    pub fn mut_attr(&mut self) -> &mut ::protobuf::RepeatedField<ApiDef_Attr> {
        &mut self.attr
    }

    // Take field
    pub fn take_attr(&mut self) -> ::protobuf::RepeatedField<ApiDef_Attr> {
        ::std::mem::replace(&mut self.attr, ::protobuf::RepeatedField::new())
    }

    // string summary = 7;


    pub fn get_summary(&self) -> &str {
        &self.summary
    }
    pub fn clear_summary(&mut self) {
        self.summary.clear();
    }

    // Param is passed by value, moved
    pub fn set_summary(&mut self, v: ::std::string::String) {
        self.summary = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_summary(&mut self) -> &mut ::std::string::String {
        &mut self.summary
    }

    // Take field
    pub fn take_summary(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.summary, ::std::string::String::new())
    }

    // string description = 8;


    pub fn get_description(&self) -> &str {
        &self.description
    }
    pub fn clear_description(&mut self) {
        self.description.clear();
    }

    // Param is passed by value, moved
    pub fn set_description(&mut self, v: ::std::string::String) {
        self.description = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_description(&mut self) -> &mut ::std::string::String {
        &mut self.description
    }

    // Take field
    pub fn take_description(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.description, ::std::string::String::new())
    }

    // string description_prefix = 9;


    pub fn get_description_prefix(&self) -> &str {
        &self.description_prefix
    }
    pub fn clear_description_prefix(&mut self) {
        self.description_prefix.clear();
    }

    // Param is passed by value, moved
    pub fn set_description_prefix(&mut self, v: ::std::string::String) {
        self.description_prefix = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_description_prefix(&mut self) -> &mut ::std::string::String {
        &mut self.description_prefix
    }

    // Take field
    pub fn take_description_prefix(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.description_prefix, ::std::string::String::new())
    }

    // string description_suffix = 10;


    pub fn get_description_suffix(&self) -> &str {
        &self.description_suffix
    }
    pub fn clear_description_suffix(&mut self) {
        self.description_suffix.clear();
    }

    // Param is passed by value, moved
    pub fn set_description_suffix(&mut self, v: ::std::string::String) {
        self.description_suffix = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_description_suffix(&mut self) -> &mut ::std::string::String {
        &mut self.description_suffix
    }

    // Take field
    pub fn take_description_suffix(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.description_suffix, ::std::string::String::new())
    }
}

impl ::protobuf::Message for ApiDef {
    fn is_initialized(&self) -> bool {
        for v in &self.endpoint {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.in_arg {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.out_arg {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.attr {
            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_proto3_string_into(wire_type, is, &mut self.graph_op_name)?;
                },
                12 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.deprecation_message)?;
                },
                13 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.deprecation_version = tmp;
                },
                2 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.visibility, 2, &mut self.unknown_fields)?
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.endpoint)?;
                },
                4 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.in_arg)?;
                },
                5 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.out_arg)?;
                },
                11 => {
                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.arg_order)?;
                },
                6 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attr)?;
                },
                7 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.summary)?;
                },
                8 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
                },
                9 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description_prefix)?;
                },
                10 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description_suffix)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.graph_op_name.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.graph_op_name);
        }
        if !self.deprecation_message.is_empty() {
            my_size += ::protobuf::rt::string_size(12, &self.deprecation_message);
        }
        if self.deprecation_version != 0 {
            my_size += ::protobuf::rt::value_size(13, self.deprecation_version, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.visibility != ApiDef_Visibility::DEFAULT_VISIBILITY {
            my_size += ::protobuf::rt::enum_size(2, self.visibility);
        }
        for value in &self.endpoint {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.in_arg {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.out_arg {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.arg_order {
            my_size += ::protobuf::rt::string_size(11, &value);
        };
        for value in &self.attr {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if !self.summary.is_empty() {
            my_size += ::protobuf::rt::string_size(7, &self.summary);
        }
        if !self.description.is_empty() {
            my_size += ::protobuf::rt::string_size(8, &self.description);
        }
        if !self.description_prefix.is_empty() {
            my_size += ::protobuf::rt::string_size(9, &self.description_prefix);
        }
        if !self.description_suffix.is_empty() {
            my_size += ::protobuf::rt::string_size(10, &self.description_suffix);
        }
        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.graph_op_name.is_empty() {
            os.write_string(1, &self.graph_op_name)?;
        }
        if !self.deprecation_message.is_empty() {
            os.write_string(12, &self.deprecation_message)?;
        }
        if self.deprecation_version != 0 {
            os.write_int32(13, self.deprecation_version)?;
        }
        if self.visibility != ApiDef_Visibility::DEFAULT_VISIBILITY {
            os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.visibility))?;
        }
        for v in &self.endpoint {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.in_arg {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.out_arg {
            os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.arg_order {
            os.write_string(11, &v)?;
        };
        for v in &self.attr {
            os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if !self.summary.is_empty() {
            os.write_string(7, &self.summary)?;
        }
        if !self.description.is_empty() {
            os.write_string(8, &self.description)?;
        }
        if !self.description_prefix.is_empty() {
            os.write_string(9, &self.description_prefix)?;
        }
        if !self.description_suffix.is_empty() {
            os.write_string(10, &self.description_suffix)?;
        }
        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() -> ApiDef {
        ApiDef::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>(
                "graph_op_name",
                |m: &ApiDef| { &m.graph_op_name },
                |m: &mut ApiDef| { &mut m.graph_op_name },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "deprecation_message",
                |m: &ApiDef| { &m.deprecation_message },
                |m: &mut ApiDef| { &mut m.deprecation_message },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "deprecation_version",
                |m: &ApiDef| { &m.deprecation_version },
                |m: &mut ApiDef| { &mut m.deprecation_version },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ApiDef_Visibility>>(
                "visibility",
                |m: &ApiDef| { &m.visibility },
                |m: &mut ApiDef| { &mut m.visibility },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ApiDef_Endpoint>>(
                "endpoint",
                |m: &ApiDef| { &m.endpoint },
                |m: &mut ApiDef| { &mut m.endpoint },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ApiDef_Arg>>(
                "in_arg",
                |m: &ApiDef| { &m.in_arg },
                |m: &mut ApiDef| { &mut m.in_arg },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ApiDef_Arg>>(
                "out_arg",
                |m: &ApiDef| { &m.out_arg },
                |m: &mut ApiDef| { &mut m.out_arg },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "arg_order",
                |m: &ApiDef| { &m.arg_order },
                |m: &mut ApiDef| { &mut m.arg_order },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ApiDef_Attr>>(
                "attr",
                |m: &ApiDef| { &m.attr },
                |m: &mut ApiDef| { &mut m.attr },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "summary",
                |m: &ApiDef| { &m.summary },
                |m: &mut ApiDef| { &mut m.summary },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "description",
                |m: &ApiDef| { &m.description },
                |m: &mut ApiDef| { &mut m.description },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "description_prefix",
                |m: &ApiDef| { &m.description_prefix },
                |m: &mut ApiDef| { &mut m.description_prefix },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "description_suffix",
                |m: &ApiDef| { &m.description_suffix },
                |m: &mut ApiDef| { &mut m.description_suffix },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ApiDef>(
                "ApiDef",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ApiDef {
        static instance: ::protobuf::rt::LazyV2<ApiDef> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ApiDef::new)
    }
}

impl ::protobuf::Clear for ApiDef {
    fn clear(&mut self) {
        self.graph_op_name.clear();
        self.deprecation_message.clear();
        self.deprecation_version = 0;
        self.visibility = ApiDef_Visibility::DEFAULT_VISIBILITY;
        self.endpoint.clear();
        self.in_arg.clear();
        self.out_arg.clear();
        self.arg_order.clear();
        self.attr.clear();
        self.summary.clear();
        self.description.clear();
        self.description_prefix.clear();
        self.description_suffix.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ApiDef {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDef {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ApiDef_Endpoint {
    // message fields
    pub name: ::std::string::String,
    pub deprecated: bool,
    pub deprecation_version: i32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ApiDef_Endpoint {
    fn default() -> &'a ApiDef_Endpoint {
        <ApiDef_Endpoint as ::protobuf::Message>::default_instance()
    }
}

impl ApiDef_Endpoint {
    pub fn new() -> ApiDef_Endpoint {
        ::std::default::Default::default()
    }

    // string name = 1;


    pub fn get_name(&self) -> &str {
        &self.name
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        &mut self.name
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.name, ::std::string::String::new())
    }

    // bool deprecated = 3;


    pub fn get_deprecated(&self) -> bool {
        self.deprecated
    }
    pub fn clear_deprecated(&mut self) {
        self.deprecated = false;
    }

    // Param is passed by value, moved
    pub fn set_deprecated(&mut self, v: bool) {
        self.deprecated = v;
    }

    // int32 deprecation_version = 4;


    pub fn get_deprecation_version(&self) -> i32 {
        self.deprecation_version
    }
    pub fn clear_deprecation_version(&mut self) {
        self.deprecation_version = 0;
    }

    // Param is passed by value, moved
    pub fn set_deprecation_version(&mut self, v: i32) {
        self.deprecation_version = v;
    }
}

impl ::protobuf::Message for ApiDef_Endpoint {
    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)?;
                },
                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.deprecated = 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_int32()?;
                    self.deprecation_version = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[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);
        }
        if self.deprecated != false {
            my_size += 2;
        }
        if self.deprecation_version != 0 {
            my_size += ::protobuf::rt::value_size(4, self.deprecation_version, ::protobuf::wire_format::WireTypeVarint);
        }
        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)?;
        }
        if self.deprecated != false {
            os.write_bool(3, self.deprecated)?;
        }
        if self.deprecation_version != 0 {
            os.write_int32(4, self.deprecation_version)?;
        }
        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() -> ApiDef_Endpoint {
        ApiDef_Endpoint::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: &ApiDef_Endpoint| { &m.name },
                |m: &mut ApiDef_Endpoint| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "deprecated",
                |m: &ApiDef_Endpoint| { &m.deprecated },
                |m: &mut ApiDef_Endpoint| { &mut m.deprecated },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "deprecation_version",
                |m: &ApiDef_Endpoint| { &m.deprecation_version },
                |m: &mut ApiDef_Endpoint| { &mut m.deprecation_version },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ApiDef_Endpoint>(
                "ApiDef.Endpoint",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ApiDef_Endpoint {
        static instance: ::protobuf::rt::LazyV2<ApiDef_Endpoint> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ApiDef_Endpoint::new)
    }
}

impl ::protobuf::Clear for ApiDef_Endpoint {
    fn clear(&mut self) {
        self.name.clear();
        self.deprecated = false;
        self.deprecation_version = 0;
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ApiDef_Endpoint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDef_Endpoint {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ApiDef_Arg {
    // message fields
    pub name: ::std::string::String,
    pub rename_to: ::std::string::String,
    pub description: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ApiDef_Arg {
    fn default() -> &'a ApiDef_Arg {
        <ApiDef_Arg as ::protobuf::Message>::default_instance()
    }
}

impl ApiDef_Arg {
    pub fn new() -> ApiDef_Arg {
        ::std::default::Default::default()
    }

    // string name = 1;


    pub fn get_name(&self) -> &str {
        &self.name
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        &mut self.name
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.name, ::std::string::String::new())
    }

    // string rename_to = 2;


    pub fn get_rename_to(&self) -> &str {
        &self.rename_to
    }
    pub fn clear_rename_to(&mut self) {
        self.rename_to.clear();
    }

    // Param is passed by value, moved
    pub fn set_rename_to(&mut self, v: ::std::string::String) {
        self.rename_to = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_rename_to(&mut self) -> &mut ::std::string::String {
        &mut self.rename_to
    }

    // Take field
    pub fn take_rename_to(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.rename_to, ::std::string::String::new())
    }

    // string description = 3;


    pub fn get_description(&self) -> &str {
        &self.description
    }
    pub fn clear_description(&mut self) {
        self.description.clear();
    }

    // Param is passed by value, moved
    pub fn set_description(&mut self, v: ::std::string::String) {
        self.description = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_description(&mut self) -> &mut ::std::string::String {
        &mut self.description
    }

    // Take field
    pub fn take_description(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.description, ::std::string::String::new())
    }
}

impl ::protobuf::Message for ApiDef_Arg {
    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_singular_proto3_string_into(wire_type, is, &mut self.rename_to)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[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);
        }
        if !self.rename_to.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.rename_to);
        }
        if !self.description.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.description);
        }
        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)?;
        }
        if !self.rename_to.is_empty() {
            os.write_string(2, &self.rename_to)?;
        }
        if !self.description.is_empty() {
            os.write_string(3, &self.description)?;
        }
        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() -> ApiDef_Arg {
        ApiDef_Arg::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: &ApiDef_Arg| { &m.name },
                |m: &mut ApiDef_Arg| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "rename_to",
                |m: &ApiDef_Arg| { &m.rename_to },
                |m: &mut ApiDef_Arg| { &mut m.rename_to },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "description",
                |m: &ApiDef_Arg| { &m.description },
                |m: &mut ApiDef_Arg| { &mut m.description },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ApiDef_Arg>(
                "ApiDef.Arg",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ApiDef_Arg {
        static instance: ::protobuf::rt::LazyV2<ApiDef_Arg> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ApiDef_Arg::new)
    }
}

impl ::protobuf::Clear for ApiDef_Arg {
    fn clear(&mut self) {
        self.name.clear();
        self.rename_to.clear();
        self.description.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ApiDef_Arg {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDef_Arg {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ApiDef_Attr {
    // message fields
    pub name: ::std::string::String,
    pub rename_to: ::std::string::String,
    pub default_value: ::protobuf::SingularPtrField<super::attr_value::AttrValue>,
    pub description: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ApiDef_Attr {
    fn default() -> &'a ApiDef_Attr {
        <ApiDef_Attr as ::protobuf::Message>::default_instance()
    }
}

impl ApiDef_Attr {
    pub fn new() -> ApiDef_Attr {
        ::std::default::Default::default()
    }

    // string name = 1;


    pub fn get_name(&self) -> &str {
        &self.name
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        &mut self.name
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.name, ::std::string::String::new())
    }

    // string rename_to = 2;


    pub fn get_rename_to(&self) -> &str {
        &self.rename_to
    }
    pub fn clear_rename_to(&mut self) {
        self.rename_to.clear();
    }

    // Param is passed by value, moved
    pub fn set_rename_to(&mut self, v: ::std::string::String) {
        self.rename_to = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_rename_to(&mut self) -> &mut ::std::string::String {
        &mut self.rename_to
    }

    // Take field
    pub fn take_rename_to(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.rename_to, ::std::string::String::new())
    }

    // .tensorflow.AttrValue default_value = 3;


    pub fn get_default_value(&self) -> &super::attr_value::AttrValue {
        self.default_value.as_ref().unwrap_or_else(|| <super::attr_value::AttrValue as ::protobuf::Message>::default_instance())
    }
    pub fn clear_default_value(&mut self) {
        self.default_value.clear();
    }

    pub fn has_default_value(&self) -> bool {
        self.default_value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_default_value(&mut self, v: super::attr_value::AttrValue) {
        self.default_value = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_default_value(&mut self) -> &mut super::attr_value::AttrValue {
        if self.default_value.is_none() {
            self.default_value.set_default();
        }
        self.default_value.as_mut().unwrap()
    }

    // Take field
    pub fn take_default_value(&mut self) -> super::attr_value::AttrValue {
        self.default_value.take().unwrap_or_else(|| super::attr_value::AttrValue::new())
    }

    // string description = 4;


    pub fn get_description(&self) -> &str {
        &self.description
    }
    pub fn clear_description(&mut self) {
        self.description.clear();
    }

    // Param is passed by value, moved
    pub fn set_description(&mut self, v: ::std::string::String) {
        self.description = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_description(&mut self) -> &mut ::std::string::String {
        &mut self.description
    }

    // Take field
    pub fn take_description(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.description, ::std::string::String::new())
    }
}

impl ::protobuf::Message for ApiDef_Attr {
    fn is_initialized(&self) -> bool {
        for v in &self.default_value {
            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_proto3_string_into(wire_type, is, &mut self.name)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.rename_to)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.default_value)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[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);
        }
        if !self.rename_to.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.rename_to);
        }
        if let Some(ref v) = self.default_value.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if !self.description.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.description);
        }
        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)?;
        }
        if !self.rename_to.is_empty() {
            os.write_string(2, &self.rename_to)?;
        }
        if let Some(ref v) = self.default_value.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if !self.description.is_empty() {
            os.write_string(4, &self.description)?;
        }
        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() -> ApiDef_Attr {
        ApiDef_Attr::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: &ApiDef_Attr| { &m.name },
                |m: &mut ApiDef_Attr| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "rename_to",
                |m: &ApiDef_Attr| { &m.rename_to },
                |m: &mut ApiDef_Attr| { &mut m.rename_to },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
                "default_value",
                |m: &ApiDef_Attr| { &m.default_value },
                |m: &mut ApiDef_Attr| { &mut m.default_value },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "description",
                |m: &ApiDef_Attr| { &m.description },
                |m: &mut ApiDef_Attr| { &mut m.description },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ApiDef_Attr>(
                "ApiDef.Attr",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ApiDef_Attr {
        static instance: ::protobuf::rt::LazyV2<ApiDef_Attr> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ApiDef_Attr::new)
    }
}

impl ::protobuf::Clear for ApiDef_Attr {
    fn clear(&mut self) {
        self.name.clear();
        self.rename_to.clear();
        self.default_value.clear();
        self.description.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ApiDef_Attr {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDef_Attr {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ApiDef_Visibility {
    DEFAULT_VISIBILITY = 0,
    VISIBLE = 1,
    SKIP = 2,
    HIDDEN = 3,
}

impl ::protobuf::ProtobufEnum for ApiDef_Visibility {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<ApiDef_Visibility> {
        match value {
            0 => ::std::option::Option::Some(ApiDef_Visibility::DEFAULT_VISIBILITY),
            1 => ::std::option::Option::Some(ApiDef_Visibility::VISIBLE),
            2 => ::std::option::Option::Some(ApiDef_Visibility::SKIP),
            3 => ::std::option::Option::Some(ApiDef_Visibility::HIDDEN),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [ApiDef_Visibility] = &[
            ApiDef_Visibility::DEFAULT_VISIBILITY,
            ApiDef_Visibility::VISIBLE,
            ApiDef_Visibility::SKIP,
            ApiDef_Visibility::HIDDEN,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<ApiDef_Visibility>("ApiDef.Visibility", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for ApiDef_Visibility {
}

impl ::std::default::Default for ApiDef_Visibility {
    fn default() -> Self {
        ApiDef_Visibility::DEFAULT_VISIBILITY
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDef_Visibility {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ApiDefs {
    // message fields
    pub op: ::protobuf::RepeatedField<ApiDef>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ApiDefs {
    fn default() -> &'a ApiDefs {
        <ApiDefs as ::protobuf::Message>::default_instance()
    }
}

impl ApiDefs {
    pub fn new() -> ApiDefs {
        ::std::default::Default::default()
    }

    // repeated .tensorflow.ApiDef op = 1;


    pub fn get_op(&self) -> &[ApiDef] {
        &self.op
    }
    pub fn clear_op(&mut self) {
        self.op.clear();
    }

    // Param is passed by value, moved
    pub fn set_op(&mut self, v: ::protobuf::RepeatedField<ApiDef>) {
        self.op = v;
    }

    // Mutable pointer to the field.
    pub fn mut_op(&mut self) -> &mut ::protobuf::RepeatedField<ApiDef> {
        &mut self.op
    }

    // Take field
    pub fn take_op(&mut self) -> ::protobuf::RepeatedField<ApiDef> {
        ::std::mem::replace(&mut self.op, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for ApiDefs {
    fn is_initialized(&self) -> bool {
        for v in &self.op {
            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.op)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.op {
            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.op {
            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() -> ApiDefs {
        ApiDefs::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<ApiDef>>(
                "op",
                |m: &ApiDefs| { &m.op },
                |m: &mut ApiDefs| { &mut m.op },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ApiDefs>(
                "ApiDefs",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ApiDefs {
        static instance: ::protobuf::rt::LazyV2<ApiDefs> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ApiDefs::new)
    }
}

impl ::protobuf::Clear for ApiDefs {
    fn clear(&mut self) {
        self.op.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ApiDefs {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ApiDefs {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n'tensorflow/core/framework/api_def.proto\x12\ntensorflow\x1a*tensorflo\
    w/core/framework/attr_value.proto\"\xf6\x07\n\x06ApiDef\x12\"\n\rgraph_o\
    p_name\x18\x01\x20\x01(\tR\x0bgraphOpName\x12/\n\x13deprecation_message\
    \x18\x0c\x20\x01(\tR\x12deprecationMessage\x12/\n\x13deprecation_version\
    \x18\r\x20\x01(\x05R\x12deprecationVersion\x12=\n\nvisibility\x18\x02\
    \x20\x01(\x0e2\x1d.tensorflow.ApiDef.VisibilityR\nvisibility\x127\n\x08e\
    ndpoint\x18\x03\x20\x03(\x0b2\x1b.tensorflow.ApiDef.EndpointR\x08endpoin\
    t\x12-\n\x06in_arg\x18\x04\x20\x03(\x0b2\x16.tensorflow.ApiDef.ArgR\x05i\
    nArg\x12/\n\x07out_arg\x18\x05\x20\x03(\x0b2\x16.tensorflow.ApiDef.ArgR\
    \x06outArg\x12\x1b\n\targ_order\x18\x0b\x20\x03(\tR\x08argOrder\x12+\n\
    \x04attr\x18\x06\x20\x03(\x0b2\x17.tensorflow.ApiDef.AttrR\x04attr\x12\
    \x18\n\x07summary\x18\x07\x20\x01(\tR\x07summary\x12\x20\n\x0bdescriptio\
    n\x18\x08\x20\x01(\tR\x0bdescription\x12-\n\x12description_prefix\x18\t\
    \x20\x01(\tR\x11descriptionPrefix\x12-\n\x12description_suffix\x18\n\x20\
    \x01(\tR\x11descriptionSuffix\x1ao\n\x08Endpoint\x12\x12\n\x04name\x18\
    \x01\x20\x01(\tR\x04name\x12\x1e\n\ndeprecated\x18\x03\x20\x01(\x08R\nde\
    precated\x12/\n\x13deprecation_version\x18\x04\x20\x01(\x05R\x12deprecat\
    ionVersion\x1aX\n\x03Arg\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\
    \x12\x1b\n\trename_to\x18\x02\x20\x01(\tR\x08renameTo\x12\x20\n\x0bdescr\
    iption\x18\x03\x20\x01(\tR\x0bdescription\x1a\x95\x01\n\x04Attr\x12\x12\
    \n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x1b\n\trename_to\x18\x02\x20\
    \x01(\tR\x08renameTo\x12:\n\rdefault_value\x18\x03\x20\x01(\x0b2\x15.ten\
    sorflow.AttrValueR\x0cdefaultValue\x12\x20\n\x0bdescription\x18\x04\x20\
    \x01(\tR\x0bdescription\"G\n\nVisibility\x12\x16\n\x12DEFAULT_VISIBILITY\
    \x10\0\x12\x0b\n\x07VISIBLE\x10\x01\x12\x08\n\x04SKIP\x10\x02\x12\n\n\
    \x06HIDDEN\x10\x03\"-\n\x07ApiDefs\x12\"\n\x02op\x18\x01\x20\x03(\x0b2\
    \x12.tensorflow.ApiDefR\x02opBl\n\x18org.tensorflow.frameworkB\x0cApiDef\
    ProtosP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framewo\
    rk\xf8\x01\x01b\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::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 {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}