google_cloud_rust_raw/api/
endpoint.rs1#![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#[derive(PartialEq,Clone,Default)]
27pub struct Endpoint {
28 pub name: ::std::string::String,
30 pub aliases: ::protobuf::RepeatedField<::std::string::String>,
31 pub target: ::std::string::String,
32 pub allow_cors: bool,
33 pub unknown_fields: ::protobuf::UnknownFields,
35 pub cached_size: ::protobuf::CachedSize,
36}
37
38impl<'a> ::std::default::Default for &'a Endpoint {
39 fn default() -> &'a Endpoint {
40 <Endpoint as ::protobuf::Message>::default_instance()
41 }
42}
43
44impl Endpoint {
45 pub fn new() -> Endpoint {
46 ::std::default::Default::default()
47 }
48
49 pub fn get_name(&self) -> &str {
53 &self.name
54 }
55 pub fn clear_name(&mut self) {
56 self.name.clear();
57 }
58
59 pub fn set_name(&mut self, v: ::std::string::String) {
61 self.name = v;
62 }
63
64 pub fn mut_name(&mut self) -> &mut ::std::string::String {
67 &mut self.name
68 }
69
70 pub fn take_name(&mut self) -> ::std::string::String {
72 ::std::mem::replace(&mut self.name, ::std::string::String::new())
73 }
74
75 pub fn get_aliases(&self) -> &[::std::string::String] {
79 &self.aliases
80 }
81 pub fn clear_aliases(&mut self) {
82 self.aliases.clear();
83 }
84
85 pub fn set_aliases(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
87 self.aliases = v;
88 }
89
90 pub fn mut_aliases(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
92 &mut self.aliases
93 }
94
95 pub fn take_aliases(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
97 ::std::mem::replace(&mut self.aliases, ::protobuf::RepeatedField::new())
98 }
99
100 pub fn get_target(&self) -> &str {
104 &self.target
105 }
106 pub fn clear_target(&mut self) {
107 self.target.clear();
108 }
109
110 pub fn set_target(&mut self, v: ::std::string::String) {
112 self.target = v;
113 }
114
115 pub fn mut_target(&mut self) -> &mut ::std::string::String {
118 &mut self.target
119 }
120
121 pub fn take_target(&mut self) -> ::std::string::String {
123 ::std::mem::replace(&mut self.target, ::std::string::String::new())
124 }
125
126 pub fn get_allow_cors(&self) -> bool {
130 self.allow_cors
131 }
132 pub fn clear_allow_cors(&mut self) {
133 self.allow_cors = false;
134 }
135
136 pub fn set_allow_cors(&mut self, v: bool) {
138 self.allow_cors = v;
139 }
140}
141
142impl ::protobuf::Message for Endpoint {
143 fn is_initialized(&self) -> bool {
144 true
145 }
146
147 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
148 while !is.eof()? {
149 let (field_number, wire_type) = is.read_tag_unpack()?;
150 match field_number {
151 1 => {
152 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
153 },
154 2 => {
155 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.aliases)?;
156 },
157 101 => {
158 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target)?;
159 },
160 5 => {
161 if wire_type != ::protobuf::wire_format::WireTypeVarint {
162 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
163 }
164 let tmp = is.read_bool()?;
165 self.allow_cors = tmp;
166 },
167 _ => {
168 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
169 },
170 };
171 }
172 ::std::result::Result::Ok(())
173 }
174
175 #[allow(unused_variables)]
177 fn compute_size(&self) -> u32 {
178 let mut my_size = 0;
179 if !self.name.is_empty() {
180 my_size += ::protobuf::rt::string_size(1, &self.name);
181 }
182 for value in &self.aliases {
183 my_size += ::protobuf::rt::string_size(2, &value);
184 };
185 if !self.target.is_empty() {
186 my_size += ::protobuf::rt::string_size(101, &self.target);
187 }
188 if self.allow_cors != false {
189 my_size += 2;
190 }
191 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
192 self.cached_size.set(my_size);
193 my_size
194 }
195
196 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
197 if !self.name.is_empty() {
198 os.write_string(1, &self.name)?;
199 }
200 for v in &self.aliases {
201 os.write_string(2, &v)?;
202 };
203 if !self.target.is_empty() {
204 os.write_string(101, &self.target)?;
205 }
206 if self.allow_cors != false {
207 os.write_bool(5, self.allow_cors)?;
208 }
209 os.write_unknown_fields(self.get_unknown_fields())?;
210 ::std::result::Result::Ok(())
211 }
212
213 fn get_cached_size(&self) -> u32 {
214 self.cached_size.get()
215 }
216
217 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
218 &self.unknown_fields
219 }
220
221 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
222 &mut self.unknown_fields
223 }
224
225 fn as_any(&self) -> &dyn (::std::any::Any) {
226 self as &dyn (::std::any::Any)
227 }
228 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
229 self as &mut dyn (::std::any::Any)
230 }
231 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
232 self
233 }
234
235 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
236 Self::descriptor_static()
237 }
238
239 fn new() -> Endpoint {
240 Endpoint::new()
241 }
242
243 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
244 static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
245 descriptor.get(|| {
246 let mut fields = ::std::vec::Vec::new();
247 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
248 "name",
249 |m: &Endpoint| { &m.name },
250 |m: &mut Endpoint| { &mut m.name },
251 ));
252 fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
253 "aliases",
254 |m: &Endpoint| { &m.aliases },
255 |m: &mut Endpoint| { &mut m.aliases },
256 ));
257 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
258 "target",
259 |m: &Endpoint| { &m.target },
260 |m: &mut Endpoint| { &mut m.target },
261 ));
262 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
263 "allow_cors",
264 |m: &Endpoint| { &m.allow_cors },
265 |m: &mut Endpoint| { &mut m.allow_cors },
266 ));
267 ::protobuf::reflect::MessageDescriptor::new_pb_name::<Endpoint>(
268 "Endpoint",
269 fields,
270 file_descriptor_proto()
271 )
272 })
273 }
274
275 fn default_instance() -> &'static Endpoint {
276 static instance: ::protobuf::rt::LazyV2<Endpoint> = ::protobuf::rt::LazyV2::INIT;
277 instance.get(Endpoint::new)
278 }
279}
280
281impl ::protobuf::Clear for Endpoint {
282 fn clear(&mut self) {
283 self.name.clear();
284 self.aliases.clear();
285 self.target.clear();
286 self.allow_cors = false;
287 self.unknown_fields.clear();
288 }
289}
290
291impl ::std::fmt::Debug for Endpoint {
292 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
293 ::protobuf::text_format::fmt(self, f)
294 }
295}
296
297impl ::protobuf::reflect::ProtobufValue for Endpoint {
298 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
299 ::protobuf::reflect::ReflectValueRef::Message(self)
300 }
301}
302
303static file_descriptor_proto_data: &'static [u8] = b"\
304 \n\x19google/api/endpoint.proto\x12\ngoogle.api\"s\n\x08Endpoint\x12\x12\
305 \n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x1c\n\x07aliases\x18\x02\x20\
306 \x03(\tR\x07aliasesB\x02\x18\x01\x12\x16\n\x06target\x18e\x20\x01(\tR\
307 \x06target\x12\x1d\n\nallow_cors\x18\x05\x20\x01(\x08R\tallowCorsBo\n\
308 \x0ecom.google.apiB\rEndpointProtoP\x01ZEgoogle.golang.org/genproto/goog\
309 leapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIJ\xcd\x16\n\x06\
310 \x12\x04\x0e\0H\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Co\
311 pyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apac\
312 he\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20ma\
313 y\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\
314 \x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\
315 \x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/\
316 LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\
317 \x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\
318 \x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20B\
319 ASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIN\
320 D,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20\
321 for\x20the\x20specific\x20language\x20governing\x20permissions\x20and\n\
322 \x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\
323 \x10\0\x13\n\x08\n\x01\x08\x12\x03\x12\0\\\n\t\n\x02\x08\x0b\x12\x03\x12\
324 \0\\\n\x08\n\x01\x08\x12\x03\x13\0\"\n\t\n\x02\x08\n\x12\x03\x13\0\"\n\
325 \x08\n\x01\x08\x12\x03\x14\0.\n\t\n\x02\x08\x08\x12\x03\x14\0.\n\x08\n\
326 \x01\x08\x12\x03\x15\0'\n\t\n\x02\x08\x01\x12\x03\x15\0'\n\x08\n\x01\x08\
327 \x12\x03\x16\0\"\n\t\n\x02\x08$\x12\x03\x16\0\"\n\xd0\x07\n\x02\x04\0\
328 \x12\x04-\0H\x01\x1a\xc3\x07\x20`Endpoint`\x20describes\x20a\x20network\
329 \x20address\x20of\x20a\x20service\x20that\x20serves\x20a\x20set\x20of\n\
330 \x20APIs.\x20It\x20is\x20commonly\x20known\x20as\x20a\x20service\x20endp\
331 oint.\x20A\x20service\x20may\x20expose\n\x20any\x20number\x20of\x20servi\
332 ce\x20endpoints,\x20and\x20all\x20service\x20endpoints\x20share\x20the\
333 \x20same\n\x20service\x20definition,\x20such\x20as\x20quota\x20limits\
334 \x20and\x20monitoring\x20metrics.\n\n\x20Example:\n\n\x20\x20\x20\x20\
335 \x20type:\x20google.api.Service\n\x20\x20\x20\x20\x20name:\x20library-ex\
336 ample.googleapis.com\n\x20\x20\x20\x20\x20endpoints:\n\x20\x20\x20\x20\
337 \x20\x20\x20#\x20Declares\x20network\x20address\x20`https://library-exam\
338 ple.googleapis.com`\n\x20\x20\x20\x20\x20\x20\x20#\x20for\x20service\x20\
339 `library-example.googleapis.com`.\x20The\x20`https`\x20scheme\n\x20\x20\
340 \x20\x20\x20\x20\x20#\x20is\x20implicit\x20for\x20all\x20service\x20endp\
341 oints.\x20Other\x20schemes\x20may\x20be\n\x20\x20\x20\x20\x20\x20\x20#\
342 \x20supported\x20in\x20the\x20future.\n\x20\x20\x20\x20\x20-\x20name:\
343 \x20library-example.googleapis.com\n\x20\x20\x20\x20\x20\x20\x20allow_co\
344 rs:\x20false\n\x20\x20\x20\x20\x20-\x20name:\x20content-staging-library-\
345 example.googleapis.com\n\x20\x20\x20\x20\x20\x20\x20#\x20Allows\x20HTTP\
346 \x20OPTIONS\x20calls\x20to\x20be\x20passed\x20to\x20the\x20API\x20fronte\
347 nd,\x20for\x20it\n\x20\x20\x20\x20\x20\x20\x20#\x20to\x20decide\x20wheth\
348 er\x20the\x20subsequent\x20cross-origin\x20request\x20is\x20allowed\n\
349 \x20\x20\x20\x20\x20\x20\x20#\x20to\x20proceed.\n\x20\x20\x20\x20\x20\
350 \x20\x20allow_cors:\x20true\n\n\n\n\x03\x04\0\x01\x12\x03-\x08\x10\n3\n\
351 \x04\x04\0\x02\0\x12\x03/\x02\x12\x1a&\x20The\x20canonical\x20name\x20of\
352 \x20this\x20endpoint.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03/\x02\x08\n\
353 \x0c\n\x05\x04\0\x02\0\x01\x12\x03/\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\
354 \x03/\x10\x11\n\x96\x02\n\x04\x04\0\x02\x01\x12\x038\x022\x1a\x88\x02\
355 \x20Unimplemented.\x20Dot\x20not\x20use.\n\n\x20DEPRECATED:\x20This\x20f\
356 ield\x20is\x20no\x20longer\x20supported.\x20Instead\x20of\x20using\x20al\
357 iases,\n\x20please\x20specify\x20multiple\x20[google.api.Endpoint][googl\
358 e.api.Endpoint]\x20for\x20each\n\x20of\x20the\x20intended\x20aliases.\n\
359 \n\x20Additional\x20names\x20that\x20this\x20endpoint\x20will\x20be\x20h\
360 osted\x20on.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x038\x02\n\n\x0c\n\x05\
361 \x04\0\x02\x01\x05\x12\x038\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\
362 \x038\x12\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x038\x1c\x1d\n\x0c\n\x05\
363 \x04\0\x02\x01\x08\x12\x038\x1e1\n\r\n\x06\x04\0\x02\x01\x08\x03\x12\x03\
364 8\x1f0\n\xb4\x02\n\x04\x04\0\x02\x02\x12\x03?\x02\x16\x1a\xa6\x02\x20The\
365 \x20specification\x20of\x20an\x20Internet\x20routable\x20address\x20of\
366 \x20API\x20frontend\x20that\x20will\n\x20handle\x20requests\x20to\x20thi\
367 s\x20[API\n\x20Endpoint](https://cloud.google.com/apis/design/glossary).\
368 \x20It\x20should\x20be\n\x20either\x20a\x20valid\x20IPv4\x20address\x20o\
369 r\x20a\x20fully-qualified\x20domain\x20name.\x20For\x20example,\n\x20\"8\
370 .8.8.8\"\x20or\x20\"myservice.appspot.com\".\n\n\x0c\n\x05\x04\0\x02\x02\
371 \x05\x12\x03?\x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03?\t\x0f\n\x0c\
372 \n\x05\x04\0\x02\x02\x03\x12\x03?\x12\x15\n\xd9\x02\n\x04\x04\0\x02\x03\
373 \x12\x03G\x02\x16\x1a\xcb\x02\x20Allowing\n\x20[CORS](https://en.wikiped\
374 ia.org/wiki/Cross-origin_resource_sharing),\x20aka\n\x20cross-domain\x20\
375 traffic,\x20would\x20allow\x20the\x20backends\x20served\x20from\x20this\
376 \x20endpoint\x20to\n\x20receive\x20and\x20respond\x20to\x20HTTP\x20OPTIO\
377 NS\x20requests.\x20The\x20response\x20will\x20be\x20used\x20by\n\x20the\
378 \x20browser\x20to\x20determine\x20whether\x20the\x20subsequent\x20cross-\
379 origin\x20request\x20is\n\x20allowed\x20to\x20proceed.\n\n\x0c\n\x05\x04\
380 \0\x02\x03\x05\x12\x03G\x02\x06\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03G\
381 \x07\x11\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03G\x14\x15b\x06proto3\
382";
383
384static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
385
386fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
387 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
388}
389
390pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
391 file_descriptor_proto_lazy.get(|| {
392 parse_descriptor_proto()
393 })
394}