beam-proto-rs 2.41.0

Rust codes generated from apache/beam .proto
Documentation
// This file is generated by rust-protobuf 3.1.0. Do not edit
// .proto file is parsed by protoc 3.21.5
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![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_results)]
#![allow(unused_mut)]

//! Generated file from `org/apache/beam/model/pipeline/v1/endpoints.proto`

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

#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:org.apache.beam.model.pipeline.v1.ApiServiceDescriptor)
pub struct ApiServiceDescriptor {
    // message fields
    // @@protoc_insertion_point(field:org.apache.beam.model.pipeline.v1.ApiServiceDescriptor.url)
    pub url: ::std::string::String,
    // @@protoc_insertion_point(field:org.apache.beam.model.pipeline.v1.ApiServiceDescriptor.authentication)
    pub authentication: ::protobuf::MessageField<AuthenticationSpec>,
    // special fields
    // @@protoc_insertion_point(special_field:org.apache.beam.model.pipeline.v1.ApiServiceDescriptor.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "url",
            |m: &ApiServiceDescriptor| { &m.url },
            |m: &mut ApiServiceDescriptor| { &mut m.url },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, AuthenticationSpec>(
            "authentication",
            |m: &ApiServiceDescriptor| { &m.authentication },
            |m: &mut ApiServiceDescriptor| { &mut m.authentication },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ApiServiceDescriptor>(
            "ApiServiceDescriptor",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for ApiServiceDescriptor {
    const NAME: &'static str = "ApiServiceDescriptor";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.url = is.read_string()?;
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.authentication)?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if !self.url.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.url);
        }
        if let Some(v) = self.authentication.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if !self.url.is_empty() {
            os.write_string(1, &self.url)?;
        }
        if let Some(v) = self.authentication.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> ApiServiceDescriptor {
        ApiServiceDescriptor::new()
    }

    fn clear(&mut self) {
        self.url.clear();
        self.authentication.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static ApiServiceDescriptor {
        static instance: ApiServiceDescriptor = ApiServiceDescriptor {
            url: ::std::string::String::new(),
            authentication: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for ApiServiceDescriptor {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("ApiServiceDescriptor").unwrap()).clone()
    }
}

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

impl ::protobuf::reflect::ProtobufValue for ApiServiceDescriptor {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:org.apache.beam.model.pipeline.v1.AuthenticationSpec)
pub struct AuthenticationSpec {
    // message fields
    // @@protoc_insertion_point(field:org.apache.beam.model.pipeline.v1.AuthenticationSpec.urn)
    pub urn: ::std::string::String,
    // @@protoc_insertion_point(field:org.apache.beam.model.pipeline.v1.AuthenticationSpec.payload)
    pub payload: ::std::vec::Vec<u8>,
    // special fields
    // @@protoc_insertion_point(special_field:org.apache.beam.model.pipeline.v1.AuthenticationSpec.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "urn",
            |m: &AuthenticationSpec| { &m.urn },
            |m: &mut AuthenticationSpec| { &mut m.urn },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "payload",
            |m: &AuthenticationSpec| { &m.payload },
            |m: &mut AuthenticationSpec| { &mut m.payload },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<AuthenticationSpec>(
            "AuthenticationSpec",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for AuthenticationSpec {
    const NAME: &'static str = "AuthenticationSpec";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.urn = is.read_string()?;
                },
                18 => {
                    self.payload = is.read_bytes()?;
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if !self.urn.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.urn);
        }
        if !self.payload.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.payload);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if !self.urn.is_empty() {
            os.write_string(1, &self.urn)?;
        }
        if !self.payload.is_empty() {
            os.write_bytes(2, &self.payload)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> AuthenticationSpec {
        AuthenticationSpec::new()
    }

    fn clear(&mut self) {
        self.urn.clear();
        self.payload.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static AuthenticationSpec {
        static instance: AuthenticationSpec = AuthenticationSpec {
            urn: ::std::string::String::new(),
            payload: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for AuthenticationSpec {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("AuthenticationSpec").unwrap()).clone()
    }
}

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

impl ::protobuf::reflect::ProtobufValue for AuthenticationSpec {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n1org/apache/beam/model/pipeline/v1/endpoints.proto\x12!org.apache.beam\
    .model.pipeline.v1\"\x87\x01\n\x14ApiServiceDescriptor\x12\x10\n\x03url\
    \x18\x01\x20\x01(\tR\x03url\x12]\n\x0eauthentication\x18\x02\x20\x01(\
    \x0b25.org.apache.beam.model.pipeline.v1.AuthenticationSpecR\x0eauthenti\
    cation\"@\n\x12AuthenticationSpec\x12\x10\n\x03urn\x18\x01\x20\x01(\tR\
    \x03urn\x12\x18\n\x07payload\x18\x02\x20\x01(\x0cR\x07payloadBx\n!org.ap\
    ache.beam.model.pipeline.v1B\tEndpointsZHgithub.com/apache/beam/sdks/v2/\
    go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(0);
            let mut messages = ::std::vec::Vec::with_capacity(2);
            messages.push(ApiServiceDescriptor::generated_message_descriptor_data());
            messages.push(AuthenticationSpec::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}