google_cloud_rust_raw/api/
source_info.rs

1// This file is generated by rust-protobuf 2.28.0. Do not edit
2// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `google/api/source_info.proto`
21
22/// Generated files are compatible only with the same version
23/// of protobuf runtime.
24// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0;
25
26#[derive(PartialEq,Clone,Default)]
27pub struct SourceInfo {
28    // message fields
29    pub source_files: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>,
30    // special fields
31    pub unknown_fields: ::protobuf::UnknownFields,
32    pub cached_size: ::protobuf::CachedSize,
33}
34
35impl<'a> ::std::default::Default for &'a SourceInfo {
36    fn default() -> &'a SourceInfo {
37        <SourceInfo as ::protobuf::Message>::default_instance()
38    }
39}
40
41impl SourceInfo {
42    pub fn new() -> SourceInfo {
43        ::std::default::Default::default()
44    }
45
46    // repeated .google.protobuf.Any source_files = 1;
47
48
49    pub fn get_source_files(&self) -> &[::protobuf::well_known_types::Any] {
50        &self.source_files
51    }
52    pub fn clear_source_files(&mut self) {
53        self.source_files.clear();
54    }
55
56    // Param is passed by value, moved
57    pub fn set_source_files(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>) {
58        self.source_files = v;
59    }
60
61    // Mutable pointer to the field.
62    pub fn mut_source_files(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
63        &mut self.source_files
64    }
65
66    // Take field
67    pub fn take_source_files(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
68        ::std::mem::replace(&mut self.source_files, ::protobuf::RepeatedField::new())
69    }
70}
71
72impl ::protobuf::Message for SourceInfo {
73    fn is_initialized(&self) -> bool {
74        for v in &self.source_files {
75            if !v.is_initialized() {
76                return false;
77            }
78        };
79        true
80    }
81
82    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
83        while !is.eof()? {
84            let (field_number, wire_type) = is.read_tag_unpack()?;
85            match field_number {
86                1 => {
87                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.source_files)?;
88                },
89                _ => {
90                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
91                },
92            };
93        }
94        ::std::result::Result::Ok(())
95    }
96
97    // Compute sizes of nested messages
98    #[allow(unused_variables)]
99    fn compute_size(&self) -> u32 {
100        let mut my_size = 0;
101        for value in &self.source_files {
102            let len = value.compute_size();
103            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
104        };
105        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
106        self.cached_size.set(my_size);
107        my_size
108    }
109
110    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
111        for v in &self.source_files {
112            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
113            os.write_raw_varint32(v.get_cached_size())?;
114            v.write_to_with_cached_sizes(os)?;
115        };
116        os.write_unknown_fields(self.get_unknown_fields())?;
117        ::std::result::Result::Ok(())
118    }
119
120    fn get_cached_size(&self) -> u32 {
121        self.cached_size.get()
122    }
123
124    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
125        &self.unknown_fields
126    }
127
128    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
129        &mut self.unknown_fields
130    }
131
132    fn as_any(&self) -> &dyn (::std::any::Any) {
133        self as &dyn (::std::any::Any)
134    }
135    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
136        self as &mut dyn (::std::any::Any)
137    }
138    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
139        self
140    }
141
142    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
143        Self::descriptor_static()
144    }
145
146    fn new() -> SourceInfo {
147        SourceInfo::new()
148    }
149
150    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
151        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
152        descriptor.get(|| {
153            let mut fields = ::std::vec::Vec::new();
154            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>(
155                "source_files",
156                |m: &SourceInfo| { &m.source_files },
157                |m: &mut SourceInfo| { &mut m.source_files },
158            ));
159            ::protobuf::reflect::MessageDescriptor::new_pb_name::<SourceInfo>(
160                "SourceInfo",
161                fields,
162                file_descriptor_proto()
163            )
164        })
165    }
166
167    fn default_instance() -> &'static SourceInfo {
168        static instance: ::protobuf::rt::LazyV2<SourceInfo> = ::protobuf::rt::LazyV2::INIT;
169        instance.get(SourceInfo::new)
170    }
171}
172
173impl ::protobuf::Clear for SourceInfo {
174    fn clear(&mut self) {
175        self.source_files.clear();
176        self.unknown_fields.clear();
177    }
178}
179
180impl ::std::fmt::Debug for SourceInfo {
181    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
182        ::protobuf::text_format::fmt(self, f)
183    }
184}
185
186impl ::protobuf::reflect::ProtobufValue for SourceInfo {
187    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
188        ::protobuf::reflect::ReflectValueRef::Message(self)
189    }
190}
191
192static file_descriptor_proto_data: &'static [u8] = b"\
193    \n\x1cgoogle/api/source_info.proto\x12\ngoogle.api\x1a\x19google/protobu\
194    f/any.proto\"E\n\nSourceInfo\x127\n\x0csource_files\x18\x01\x20\x03(\x0b\
195    2\x14.google.protobuf.AnyR\x0bsourceFilesBq\n\x0ecom.google.apiB\x0fSour\
196    ceInfoProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfi\
197    g;serviceconfig\xa2\x02\x04GAPIJ\x84\x07\n\x06\x12\x04\x0e\0\x1e\x01\n\
198    \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Go\
199    ogle\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Ver\
200    sion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20th\
201    is\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\
202    \x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\
203    \x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Un\
204    less\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\
205    \x20writing,\x20software\n\x20distributed\x20under\x20the\x20License\x20\
206    is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20\
207    WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20expres\
208    s\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\
209    \x20language\x20governing\x20permissions\x20and\n\x20limitations\x20unde\
210    r\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x13\n\t\n\x02\x03\0\
211    \x12\x03\x12\0#\n\x08\n\x01\x08\x12\x03\x14\0\\\n\t\n\x02\x08\x0b\x12\
212    \x03\x14\0\\\n\x08\n\x01\x08\x12\x03\x15\0\"\n\t\n\x02\x08\n\x12\x03\x15\
213    \0\"\n\x08\n\x01\x08\x12\x03\x16\00\n\t\n\x02\x08\x08\x12\x03\x16\00\n\
214    \x08\n\x01\x08\x12\x03\x17\0'\n\t\n\x02\x08\x01\x12\x03\x17\0'\n\x08\n\
215    \x01\x08\x12\x03\x18\0\"\n\t\n\x02\x08$\x12\x03\x18\0\"\n@\n\x02\x04\0\
216    \x12\x04\x1b\0\x1e\x01\x1a4\x20Source\x20information\x20used\x20to\x20cr\
217    eate\x20a\x20Service\x20Config\n\n\n\n\x03\x04\0\x01\x12\x03\x1b\x08\x12\
218    \n7\n\x04\x04\0\x02\0\x12\x03\x1d\x020\x1a*\x20All\x20files\x20used\x20d\
219    uring\x20config\x20generation.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x1d\
220    \x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x1d\x0b\x1e\n\x0c\n\x05\x04\0\
221    \x02\0\x01\x12\x03\x1d\x1f+\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x1d./b\
222    \x06proto3\
223";
224
225static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
226
227fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
228    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
229}
230
231pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
232    file_descriptor_proto_lazy.get(|| {
233        parse_descriptor_proto()
234    })
235}