google-cloud-rust-raw 0.14.0

A set of client libraries to interact with various Google Cloud Platform services
Documentation
// This file is generated by rust-protobuf 2.28.0. Do not edit
// @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_imports)]
#![allow(unused_results)]
//! Generated file from `google/api/source_info.proto`

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

#[derive(PartialEq,Clone,Default)]
pub struct SourceInfo {
    // message fields
    pub source_files: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // repeated .google.protobuf.Any source_files = 1;


    pub fn get_source_files(&self) -> &[::protobuf::well_known_types::Any] {
        &self.source_files
    }
    pub fn clear_source_files(&mut self) {
        self.source_files.clear();
    }

    // Param is passed by value, moved
    pub fn set_source_files(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>) {
        self.source_files = v;
    }

    // Mutable pointer to the field.
    pub fn mut_source_files(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
        &mut self.source_files
    }

    // Take field
    pub fn take_source_files(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
        ::std::mem::replace(&mut self.source_files, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for SourceInfo {
    fn is_initialized(&self) -> bool {
        for v in &self.source_files {
            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.source_files)?;
                },
                _ => {
                    ::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.source_files {
            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.source_files {
            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() -> SourceInfo {
        SourceInfo::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<::protobuf::well_known_types::Any>>(
                "source_files",
                |m: &SourceInfo| { &m.source_files },
                |m: &mut SourceInfo| { &mut m.source_files },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<SourceInfo>(
                "SourceInfo",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1cgoogle/api/source_info.proto\x12\ngoogle.api\x1a\x19google/protobu\
    f/any.proto\"E\n\nSourceInfo\x127\n\x0csource_files\x18\x01\x20\x03(\x0b\
    2\x14.google.protobuf.AnyR\x0bsourceFilesBq\n\x0ecom.google.apiB\x0fSour\
    ceInfoProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfi\
    g;serviceconfig\xa2\x02\x04GAPIJ\x86\x07\n\x06\x12\x04\x0f\0\x1f\x01\n\
    \xbe\x04\n\x01\x0c\x12\x03\x0f\0\x122\xb3\x04\x20Copyright\x202019\x20Go\
    ogle\x20LLC.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Ve\
    rsion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20t\
    his\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\
    \x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\
    \x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Un\
    less\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\
    \x20writing,\x20software\n\x20distributed\x20under\x20the\x20License\x20\
    is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20\
    WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20expres\
    s\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\
    \x20language\x20governing\x20permissions\x20and\n\x20limitations\x20unde\
    r\x20the\x20License.\n\n\n\x08\n\x01\x02\x12\x03\x11\0\x13\n\t\n\x02\x03\
    \0\x12\x03\x13\0#\n\x08\n\x01\x08\x12\x03\x15\0\\\n\t\n\x02\x08\x0b\x12\
    \x03\x15\0\\\n\x08\n\x01\x08\x12\x03\x16\0\"\n\t\n\x02\x08\n\x12\x03\x16\
    \0\"\n\x08\n\x01\x08\x12\x03\x17\00\n\t\n\x02\x08\x08\x12\x03\x17\00\n\
    \x08\n\x01\x08\x12\x03\x18\0'\n\t\n\x02\x08\x01\x12\x03\x18\0'\n\x08\n\
    \x01\x08\x12\x03\x19\0\"\n\t\n\x02\x08$\x12\x03\x19\0\"\n@\n\x02\x04\0\
    \x12\x04\x1c\0\x1f\x01\x1a4\x20Source\x20information\x20used\x20to\x20cr\
    eate\x20a\x20Service\x20Config\n\n\n\n\x03\x04\0\x01\x12\x03\x1c\x08\x12\
    \n7\n\x04\x04\0\x02\0\x12\x03\x1e\x020\x1a*\x20All\x20files\x20used\x20d\
    uring\x20config\x20generation.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x1e\
    \x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x1e\x0b\x1e\n\x0c\n\x05\x04\0\
    \x02\0\x01\x12\x03\x1e\x1f+\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x1e./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()
    })
}