google_cloud_rust_raw/api/servicecontrol/v1/
http_request.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/servicecontrol/v1/http_request.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 HttpRequest {
28    // message fields
29    pub request_method: ::std::string::String,
30    pub request_url: ::std::string::String,
31    pub request_size: i64,
32    pub status: i32,
33    pub response_size: i64,
34    pub user_agent: ::std::string::String,
35    pub remote_ip: ::std::string::String,
36    pub server_ip: ::std::string::String,
37    pub referer: ::std::string::String,
38    pub latency: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>,
39    pub cache_lookup: bool,
40    pub cache_hit: bool,
41    pub cache_validated_with_origin_server: bool,
42    pub cache_fill_bytes: i64,
43    pub protocol: ::std::string::String,
44    // special fields
45    pub unknown_fields: ::protobuf::UnknownFields,
46    pub cached_size: ::protobuf::CachedSize,
47}
48
49impl<'a> ::std::default::Default for &'a HttpRequest {
50    fn default() -> &'a HttpRequest {
51        <HttpRequest as ::protobuf::Message>::default_instance()
52    }
53}
54
55impl HttpRequest {
56    pub fn new() -> HttpRequest {
57        ::std::default::Default::default()
58    }
59
60    // string request_method = 1;
61
62
63    pub fn get_request_method(&self) -> &str {
64        &self.request_method
65    }
66    pub fn clear_request_method(&mut self) {
67        self.request_method.clear();
68    }
69
70    // Param is passed by value, moved
71    pub fn set_request_method(&mut self, v: ::std::string::String) {
72        self.request_method = v;
73    }
74
75    // Mutable pointer to the field.
76    // If field is not initialized, it is initialized with default value first.
77    pub fn mut_request_method(&mut self) -> &mut ::std::string::String {
78        &mut self.request_method
79    }
80
81    // Take field
82    pub fn take_request_method(&mut self) -> ::std::string::String {
83        ::std::mem::replace(&mut self.request_method, ::std::string::String::new())
84    }
85
86    // string request_url = 2;
87
88
89    pub fn get_request_url(&self) -> &str {
90        &self.request_url
91    }
92    pub fn clear_request_url(&mut self) {
93        self.request_url.clear();
94    }
95
96    // Param is passed by value, moved
97    pub fn set_request_url(&mut self, v: ::std::string::String) {
98        self.request_url = v;
99    }
100
101    // Mutable pointer to the field.
102    // If field is not initialized, it is initialized with default value first.
103    pub fn mut_request_url(&mut self) -> &mut ::std::string::String {
104        &mut self.request_url
105    }
106
107    // Take field
108    pub fn take_request_url(&mut self) -> ::std::string::String {
109        ::std::mem::replace(&mut self.request_url, ::std::string::String::new())
110    }
111
112    // int64 request_size = 3;
113
114
115    pub fn get_request_size(&self) -> i64 {
116        self.request_size
117    }
118    pub fn clear_request_size(&mut self) {
119        self.request_size = 0;
120    }
121
122    // Param is passed by value, moved
123    pub fn set_request_size(&mut self, v: i64) {
124        self.request_size = v;
125    }
126
127    // int32 status = 4;
128
129
130    pub fn get_status(&self) -> i32 {
131        self.status
132    }
133    pub fn clear_status(&mut self) {
134        self.status = 0;
135    }
136
137    // Param is passed by value, moved
138    pub fn set_status(&mut self, v: i32) {
139        self.status = v;
140    }
141
142    // int64 response_size = 5;
143
144
145    pub fn get_response_size(&self) -> i64 {
146        self.response_size
147    }
148    pub fn clear_response_size(&mut self) {
149        self.response_size = 0;
150    }
151
152    // Param is passed by value, moved
153    pub fn set_response_size(&mut self, v: i64) {
154        self.response_size = v;
155    }
156
157    // string user_agent = 6;
158
159
160    pub fn get_user_agent(&self) -> &str {
161        &self.user_agent
162    }
163    pub fn clear_user_agent(&mut self) {
164        self.user_agent.clear();
165    }
166
167    // Param is passed by value, moved
168    pub fn set_user_agent(&mut self, v: ::std::string::String) {
169        self.user_agent = v;
170    }
171
172    // Mutable pointer to the field.
173    // If field is not initialized, it is initialized with default value first.
174    pub fn mut_user_agent(&mut self) -> &mut ::std::string::String {
175        &mut self.user_agent
176    }
177
178    // Take field
179    pub fn take_user_agent(&mut self) -> ::std::string::String {
180        ::std::mem::replace(&mut self.user_agent, ::std::string::String::new())
181    }
182
183    // string remote_ip = 7;
184
185
186    pub fn get_remote_ip(&self) -> &str {
187        &self.remote_ip
188    }
189    pub fn clear_remote_ip(&mut self) {
190        self.remote_ip.clear();
191    }
192
193    // Param is passed by value, moved
194    pub fn set_remote_ip(&mut self, v: ::std::string::String) {
195        self.remote_ip = v;
196    }
197
198    // Mutable pointer to the field.
199    // If field is not initialized, it is initialized with default value first.
200    pub fn mut_remote_ip(&mut self) -> &mut ::std::string::String {
201        &mut self.remote_ip
202    }
203
204    // Take field
205    pub fn take_remote_ip(&mut self) -> ::std::string::String {
206        ::std::mem::replace(&mut self.remote_ip, ::std::string::String::new())
207    }
208
209    // string server_ip = 13;
210
211
212    pub fn get_server_ip(&self) -> &str {
213        &self.server_ip
214    }
215    pub fn clear_server_ip(&mut self) {
216        self.server_ip.clear();
217    }
218
219    // Param is passed by value, moved
220    pub fn set_server_ip(&mut self, v: ::std::string::String) {
221        self.server_ip = v;
222    }
223
224    // Mutable pointer to the field.
225    // If field is not initialized, it is initialized with default value first.
226    pub fn mut_server_ip(&mut self) -> &mut ::std::string::String {
227        &mut self.server_ip
228    }
229
230    // Take field
231    pub fn take_server_ip(&mut self) -> ::std::string::String {
232        ::std::mem::replace(&mut self.server_ip, ::std::string::String::new())
233    }
234
235    // string referer = 8;
236
237
238    pub fn get_referer(&self) -> &str {
239        &self.referer
240    }
241    pub fn clear_referer(&mut self) {
242        self.referer.clear();
243    }
244
245    // Param is passed by value, moved
246    pub fn set_referer(&mut self, v: ::std::string::String) {
247        self.referer = v;
248    }
249
250    // Mutable pointer to the field.
251    // If field is not initialized, it is initialized with default value first.
252    pub fn mut_referer(&mut self) -> &mut ::std::string::String {
253        &mut self.referer
254    }
255
256    // Take field
257    pub fn take_referer(&mut self) -> ::std::string::String {
258        ::std::mem::replace(&mut self.referer, ::std::string::String::new())
259    }
260
261    // .google.protobuf.Duration latency = 14;
262
263
264    pub fn get_latency(&self) -> &::protobuf::well_known_types::Duration {
265        self.latency.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance())
266    }
267    pub fn clear_latency(&mut self) {
268        self.latency.clear();
269    }
270
271    pub fn has_latency(&self) -> bool {
272        self.latency.is_some()
273    }
274
275    // Param is passed by value, moved
276    pub fn set_latency(&mut self, v: ::protobuf::well_known_types::Duration) {
277        self.latency = ::protobuf::SingularPtrField::some(v);
278    }
279
280    // Mutable pointer to the field.
281    // If field is not initialized, it is initialized with default value first.
282    pub fn mut_latency(&mut self) -> &mut ::protobuf::well_known_types::Duration {
283        if self.latency.is_none() {
284            self.latency.set_default();
285        }
286        self.latency.as_mut().unwrap()
287    }
288
289    // Take field
290    pub fn take_latency(&mut self) -> ::protobuf::well_known_types::Duration {
291        self.latency.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new())
292    }
293
294    // bool cache_lookup = 11;
295
296
297    pub fn get_cache_lookup(&self) -> bool {
298        self.cache_lookup
299    }
300    pub fn clear_cache_lookup(&mut self) {
301        self.cache_lookup = false;
302    }
303
304    // Param is passed by value, moved
305    pub fn set_cache_lookup(&mut self, v: bool) {
306        self.cache_lookup = v;
307    }
308
309    // bool cache_hit = 9;
310
311
312    pub fn get_cache_hit(&self) -> bool {
313        self.cache_hit
314    }
315    pub fn clear_cache_hit(&mut self) {
316        self.cache_hit = false;
317    }
318
319    // Param is passed by value, moved
320    pub fn set_cache_hit(&mut self, v: bool) {
321        self.cache_hit = v;
322    }
323
324    // bool cache_validated_with_origin_server = 10;
325
326
327    pub fn get_cache_validated_with_origin_server(&self) -> bool {
328        self.cache_validated_with_origin_server
329    }
330    pub fn clear_cache_validated_with_origin_server(&mut self) {
331        self.cache_validated_with_origin_server = false;
332    }
333
334    // Param is passed by value, moved
335    pub fn set_cache_validated_with_origin_server(&mut self, v: bool) {
336        self.cache_validated_with_origin_server = v;
337    }
338
339    // int64 cache_fill_bytes = 12;
340
341
342    pub fn get_cache_fill_bytes(&self) -> i64 {
343        self.cache_fill_bytes
344    }
345    pub fn clear_cache_fill_bytes(&mut self) {
346        self.cache_fill_bytes = 0;
347    }
348
349    // Param is passed by value, moved
350    pub fn set_cache_fill_bytes(&mut self, v: i64) {
351        self.cache_fill_bytes = v;
352    }
353
354    // string protocol = 15;
355
356
357    pub fn get_protocol(&self) -> &str {
358        &self.protocol
359    }
360    pub fn clear_protocol(&mut self) {
361        self.protocol.clear();
362    }
363
364    // Param is passed by value, moved
365    pub fn set_protocol(&mut self, v: ::std::string::String) {
366        self.protocol = v;
367    }
368
369    // Mutable pointer to the field.
370    // If field is not initialized, it is initialized with default value first.
371    pub fn mut_protocol(&mut self) -> &mut ::std::string::String {
372        &mut self.protocol
373    }
374
375    // Take field
376    pub fn take_protocol(&mut self) -> ::std::string::String {
377        ::std::mem::replace(&mut self.protocol, ::std::string::String::new())
378    }
379}
380
381impl ::protobuf::Message for HttpRequest {
382    fn is_initialized(&self) -> bool {
383        for v in &self.latency {
384            if !v.is_initialized() {
385                return false;
386            }
387        };
388        true
389    }
390
391    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
392        while !is.eof()? {
393            let (field_number, wire_type) = is.read_tag_unpack()?;
394            match field_number {
395                1 => {
396                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.request_method)?;
397                },
398                2 => {
399                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.request_url)?;
400                },
401                3 => {
402                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
403                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
404                    }
405                    let tmp = is.read_int64()?;
406                    self.request_size = tmp;
407                },
408                4 => {
409                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
410                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
411                    }
412                    let tmp = is.read_int32()?;
413                    self.status = tmp;
414                },
415                5 => {
416                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
417                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
418                    }
419                    let tmp = is.read_int64()?;
420                    self.response_size = tmp;
421                },
422                6 => {
423                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_agent)?;
424                },
425                7 => {
426                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.remote_ip)?;
427                },
428                13 => {
429                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.server_ip)?;
430                },
431                8 => {
432                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.referer)?;
433                },
434                14 => {
435                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.latency)?;
436                },
437                11 => {
438                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
439                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
440                    }
441                    let tmp = is.read_bool()?;
442                    self.cache_lookup = tmp;
443                },
444                9 => {
445                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
446                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
447                    }
448                    let tmp = is.read_bool()?;
449                    self.cache_hit = tmp;
450                },
451                10 => {
452                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
453                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
454                    }
455                    let tmp = is.read_bool()?;
456                    self.cache_validated_with_origin_server = tmp;
457                },
458                12 => {
459                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
460                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
461                    }
462                    let tmp = is.read_int64()?;
463                    self.cache_fill_bytes = tmp;
464                },
465                15 => {
466                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.protocol)?;
467                },
468                _ => {
469                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
470                },
471            };
472        }
473        ::std::result::Result::Ok(())
474    }
475
476    // Compute sizes of nested messages
477    #[allow(unused_variables)]
478    fn compute_size(&self) -> u32 {
479        let mut my_size = 0;
480        if !self.request_method.is_empty() {
481            my_size += ::protobuf::rt::string_size(1, &self.request_method);
482        }
483        if !self.request_url.is_empty() {
484            my_size += ::protobuf::rt::string_size(2, &self.request_url);
485        }
486        if self.request_size != 0 {
487            my_size += ::protobuf::rt::value_size(3, self.request_size, ::protobuf::wire_format::WireTypeVarint);
488        }
489        if self.status != 0 {
490            my_size += ::protobuf::rt::value_size(4, self.status, ::protobuf::wire_format::WireTypeVarint);
491        }
492        if self.response_size != 0 {
493            my_size += ::protobuf::rt::value_size(5, self.response_size, ::protobuf::wire_format::WireTypeVarint);
494        }
495        if !self.user_agent.is_empty() {
496            my_size += ::protobuf::rt::string_size(6, &self.user_agent);
497        }
498        if !self.remote_ip.is_empty() {
499            my_size += ::protobuf::rt::string_size(7, &self.remote_ip);
500        }
501        if !self.server_ip.is_empty() {
502            my_size += ::protobuf::rt::string_size(13, &self.server_ip);
503        }
504        if !self.referer.is_empty() {
505            my_size += ::protobuf::rt::string_size(8, &self.referer);
506        }
507        if let Some(ref v) = self.latency.as_ref() {
508            let len = v.compute_size();
509            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
510        }
511        if self.cache_lookup != false {
512            my_size += 2;
513        }
514        if self.cache_hit != false {
515            my_size += 2;
516        }
517        if self.cache_validated_with_origin_server != false {
518            my_size += 2;
519        }
520        if self.cache_fill_bytes != 0 {
521            my_size += ::protobuf::rt::value_size(12, self.cache_fill_bytes, ::protobuf::wire_format::WireTypeVarint);
522        }
523        if !self.protocol.is_empty() {
524            my_size += ::protobuf::rt::string_size(15, &self.protocol);
525        }
526        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
527        self.cached_size.set(my_size);
528        my_size
529    }
530
531    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
532        if !self.request_method.is_empty() {
533            os.write_string(1, &self.request_method)?;
534        }
535        if !self.request_url.is_empty() {
536            os.write_string(2, &self.request_url)?;
537        }
538        if self.request_size != 0 {
539            os.write_int64(3, self.request_size)?;
540        }
541        if self.status != 0 {
542            os.write_int32(4, self.status)?;
543        }
544        if self.response_size != 0 {
545            os.write_int64(5, self.response_size)?;
546        }
547        if !self.user_agent.is_empty() {
548            os.write_string(6, &self.user_agent)?;
549        }
550        if !self.remote_ip.is_empty() {
551            os.write_string(7, &self.remote_ip)?;
552        }
553        if !self.server_ip.is_empty() {
554            os.write_string(13, &self.server_ip)?;
555        }
556        if !self.referer.is_empty() {
557            os.write_string(8, &self.referer)?;
558        }
559        if let Some(ref v) = self.latency.as_ref() {
560            os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
561            os.write_raw_varint32(v.get_cached_size())?;
562            v.write_to_with_cached_sizes(os)?;
563        }
564        if self.cache_lookup != false {
565            os.write_bool(11, self.cache_lookup)?;
566        }
567        if self.cache_hit != false {
568            os.write_bool(9, self.cache_hit)?;
569        }
570        if self.cache_validated_with_origin_server != false {
571            os.write_bool(10, self.cache_validated_with_origin_server)?;
572        }
573        if self.cache_fill_bytes != 0 {
574            os.write_int64(12, self.cache_fill_bytes)?;
575        }
576        if !self.protocol.is_empty() {
577            os.write_string(15, &self.protocol)?;
578        }
579        os.write_unknown_fields(self.get_unknown_fields())?;
580        ::std::result::Result::Ok(())
581    }
582
583    fn get_cached_size(&self) -> u32 {
584        self.cached_size.get()
585    }
586
587    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
588        &self.unknown_fields
589    }
590
591    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
592        &mut self.unknown_fields
593    }
594
595    fn as_any(&self) -> &dyn (::std::any::Any) {
596        self as &dyn (::std::any::Any)
597    }
598    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
599        self as &mut dyn (::std::any::Any)
600    }
601    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
602        self
603    }
604
605    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
606        Self::descriptor_static()
607    }
608
609    fn new() -> HttpRequest {
610        HttpRequest::new()
611    }
612
613    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
614        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
615        descriptor.get(|| {
616            let mut fields = ::std::vec::Vec::new();
617            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
618                "request_method",
619                |m: &HttpRequest| { &m.request_method },
620                |m: &mut HttpRequest| { &mut m.request_method },
621            ));
622            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
623                "request_url",
624                |m: &HttpRequest| { &m.request_url },
625                |m: &mut HttpRequest| { &mut m.request_url },
626            ));
627            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
628                "request_size",
629                |m: &HttpRequest| { &m.request_size },
630                |m: &mut HttpRequest| { &mut m.request_size },
631            ));
632            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
633                "status",
634                |m: &HttpRequest| { &m.status },
635                |m: &mut HttpRequest| { &mut m.status },
636            ));
637            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
638                "response_size",
639                |m: &HttpRequest| { &m.response_size },
640                |m: &mut HttpRequest| { &mut m.response_size },
641            ));
642            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
643                "user_agent",
644                |m: &HttpRequest| { &m.user_agent },
645                |m: &mut HttpRequest| { &mut m.user_agent },
646            ));
647            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
648                "remote_ip",
649                |m: &HttpRequest| { &m.remote_ip },
650                |m: &mut HttpRequest| { &mut m.remote_ip },
651            ));
652            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
653                "server_ip",
654                |m: &HttpRequest| { &m.server_ip },
655                |m: &mut HttpRequest| { &mut m.server_ip },
656            ));
657            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
658                "referer",
659                |m: &HttpRequest| { &m.referer },
660                |m: &mut HttpRequest| { &mut m.referer },
661            ));
662            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>(
663                "latency",
664                |m: &HttpRequest| { &m.latency },
665                |m: &mut HttpRequest| { &mut m.latency },
666            ));
667            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
668                "cache_lookup",
669                |m: &HttpRequest| { &m.cache_lookup },
670                |m: &mut HttpRequest| { &mut m.cache_lookup },
671            ));
672            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
673                "cache_hit",
674                |m: &HttpRequest| { &m.cache_hit },
675                |m: &mut HttpRequest| { &mut m.cache_hit },
676            ));
677            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
678                "cache_validated_with_origin_server",
679                |m: &HttpRequest| { &m.cache_validated_with_origin_server },
680                |m: &mut HttpRequest| { &mut m.cache_validated_with_origin_server },
681            ));
682            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
683                "cache_fill_bytes",
684                |m: &HttpRequest| { &m.cache_fill_bytes },
685                |m: &mut HttpRequest| { &mut m.cache_fill_bytes },
686            ));
687            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
688                "protocol",
689                |m: &HttpRequest| { &m.protocol },
690                |m: &mut HttpRequest| { &mut m.protocol },
691            ));
692            ::protobuf::reflect::MessageDescriptor::new_pb_name::<HttpRequest>(
693                "HttpRequest",
694                fields,
695                file_descriptor_proto()
696            )
697        })
698    }
699
700    fn default_instance() -> &'static HttpRequest {
701        static instance: ::protobuf::rt::LazyV2<HttpRequest> = ::protobuf::rt::LazyV2::INIT;
702        instance.get(HttpRequest::new)
703    }
704}
705
706impl ::protobuf::Clear for HttpRequest {
707    fn clear(&mut self) {
708        self.request_method.clear();
709        self.request_url.clear();
710        self.request_size = 0;
711        self.status = 0;
712        self.response_size = 0;
713        self.user_agent.clear();
714        self.remote_ip.clear();
715        self.server_ip.clear();
716        self.referer.clear();
717        self.latency.clear();
718        self.cache_lookup = false;
719        self.cache_hit = false;
720        self.cache_validated_with_origin_server = false;
721        self.cache_fill_bytes = 0;
722        self.protocol.clear();
723        self.unknown_fields.clear();
724    }
725}
726
727impl ::std::fmt::Debug for HttpRequest {
728    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
729        ::protobuf::text_format::fmt(self, f)
730    }
731}
732
733impl ::protobuf::reflect::ProtobufValue for HttpRequest {
734    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
735        ::protobuf::reflect::ReflectValueRef::Message(self)
736    }
737}
738
739static file_descriptor_proto_data: &'static [u8] = b"\
740    \n/google/api/servicecontrol/v1/http_request.proto\x12\x1cgoogle.api.ser\
741    vicecontrol.v1\x1a\x1egoogle/protobuf/duration.proto\"\xaf\x04\n\x0bHttp\
742    Request\x12%\n\x0erequest_method\x18\x01\x20\x01(\tR\rrequestMethod\x12\
743    \x1f\n\x0brequest_url\x18\x02\x20\x01(\tR\nrequestUrl\x12!\n\x0crequest_\
744    size\x18\x03\x20\x01(\x03R\x0brequestSize\x12\x16\n\x06status\x18\x04\
745    \x20\x01(\x05R\x06status\x12#\n\rresponse_size\x18\x05\x20\x01(\x03R\x0c\
746    responseSize\x12\x1d\n\nuser_agent\x18\x06\x20\x01(\tR\tuserAgent\x12\
747    \x1b\n\tremote_ip\x18\x07\x20\x01(\tR\x08remoteIp\x12\x1b\n\tserver_ip\
748    \x18\r\x20\x01(\tR\x08serverIp\x12\x18\n\x07referer\x18\x08\x20\x01(\tR\
749    \x07referer\x123\n\x07latency\x18\x0e\x20\x01(\x0b2\x19.google.protobuf.\
750    DurationR\x07latency\x12!\n\x0ccache_lookup\x18\x0b\x20\x01(\x08R\x0bcac\
751    heLookup\x12\x1b\n\tcache_hit\x18\t\x20\x01(\x08R\x08cacheHit\x12J\n\"ca\
752    che_validated_with_origin_server\x18\n\x20\x01(\x08R\x1ecacheValidatedWi\
753    thOriginServer\x12(\n\x10cache_fill_bytes\x18\x0c\x20\x01(\x03R\x0ecache\
754    FillBytes\x12\x1a\n\x08protocol\x18\x0f\x20\x01(\tR\x08protocolB\xe8\x01\
755    \n\x20com.google.api.servicecontrol.v1B\x10HttpRequestProtoP\x01ZJcloud.\
756    google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\
757    \x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\Service\
758    Control\\V1\xea\x02!Google::Cloud::ServiceControl::V1J\xdc\x1a\n\x06\x12\
759    \x04\x0e\0\\\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyr\
760    ight\x202021\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\
761    \x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\
762    \x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\x20\
763    the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20L\
764    icense\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICEN\
765    SE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agr\
766    eed\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\
767    \x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\
768    \x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20e\
769    ither\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20\
770    the\x20specific\x20language\x20governing\x20permissions\x20and\n\x20limi\
771    tations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0%\n\t\
772    \n\x02\x03\0\x12\x03\x12\0(\n\x08\n\x01\x08\x12\x03\x14\0;\n\t\n\x02\x08\
773    %\x12\x03\x14\0;\n\x08\n\x01\x08\x12\x03\x15\0a\n\t\n\x02\x08\x0b\x12\
774    \x03\x15\0a\n\x08\n\x01\x08\x12\x03\x16\0\"\n\t\n\x02\x08\n\x12\x03\x16\
775    \0\"\n\x08\n\x01\x08\x12\x03\x17\01\n\t\n\x02\x08\x08\x12\x03\x17\01\n\
776    \x08\n\x01\x08\x12\x03\x18\09\n\t\n\x02\x08\x01\x12\x03\x18\09\n\x08\n\
777    \x01\x08\x12\x03\x19\0;\n\t\n\x02\x08)\x12\x03\x19\0;\n\x08\n\x01\x08\
778    \x12\x03\x1a\0:\n\t\n\x02\x08-\x12\x03\x1a\0:\n\xc1\x01\n\x02\x04\0\x12\
779    \x04\x1f\0\\\x01\x1a\xb4\x01\x20A\x20common\x20proto\x20for\x20logging\
780    \x20HTTP\x20requests.\x20Only\x20contains\x20semantics\n\x20defined\x20b\
781    y\x20the\x20HTTP\x20specification.\x20Product-specific\x20logging\n\x20i\
782    nformation\x20MUST\x20be\x20defined\x20in\x20a\x20separate\x20message.\n\
783    \n\n\n\x03\x04\0\x01\x12\x03\x1f\x08\x13\nR\n\x04\x04\0\x02\0\x12\x03!\
784    \x02\x1c\x1aE\x20The\x20request\x20method.\x20Examples:\x20`\"GET\"`,\
785    \x20`\"HEAD\"`,\x20`\"PUT\"`,\x20`\"POST\"`.\n\n\x0c\n\x05\x04\0\x02\0\
786    \x05\x12\x03!\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03!\t\x17\n\x0c\n\
787    \x05\x04\0\x02\0\x03\x12\x03!\x1a\x1b\n\xae\x01\n\x04\x04\0\x02\x01\x12\
788    \x03&\x02\x19\x1a\xa0\x01\x20The\x20scheme\x20(http,\x20https),\x20the\
789    \x20host\x20name,\x20the\x20path,\x20and\x20the\x20query\n\x20portion\
790    \x20of\x20the\x20URL\x20that\x20was\x20requested.\n\x20Example:\x20`\"ht\
791    tp://example.com/some/info?color=red\"`.\n\n\x0c\n\x05\x04\0\x02\x01\x05\
792    \x12\x03&\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03&\t\x14\n\x0c\n\
793    \x05\x04\0\x02\x01\x03\x12\x03&\x17\x18\nr\n\x04\x04\0\x02\x02\x12\x03*\
794    \x02\x19\x1ae\x20The\x20size\x20of\x20the\x20HTTP\x20request\x20message\
795    \x20in\x20bytes,\x20including\x20the\x20request\n\x20headers\x20and\x20t\
796    he\x20request\x20body.\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03*\x02\x07\
797    \n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03*\x08\x14\n\x0c\n\x05\x04\0\x02\
798    \x02\x03\x12\x03*\x17\x18\n\\\n\x04\x04\0\x02\x03\x12\x03.\x02\x13\x1aO\
799    \x20The\x20response\x20code\x20indicating\x20the\x20status\x20of\x20the\
800    \x20response.\n\x20Examples:\x20200,\x20404.\n\n\x0c\n\x05\x04\0\x02\x03\
801    \x05\x12\x03.\x02\x07\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03.\x08\x0e\n\
802    \x0c\n\x05\x04\0\x02\x03\x03\x12\x03.\x11\x12\n\x8f\x01\n\x04\x04\0\x02\
803    \x04\x12\x032\x02\x1a\x1a\x81\x01\x20The\x20size\x20of\x20the\x20HTTP\
804    \x20response\x20message\x20sent\x20back\x20to\x20the\x20client,\x20in\
805    \x20bytes,\n\x20including\x20the\x20response\x20headers\x20and\x20the\
806    \x20response\x20body.\n\n\x0c\n\x05\x04\0\x02\x04\x05\x12\x032\x02\x07\n\
807    \x0c\n\x05\x04\0\x02\x04\x01\x12\x032\x08\x15\n\x0c\n\x05\x04\0\x02\x04\
808    \x03\x12\x032\x18\x19\n\x8c\x01\n\x04\x04\0\x02\x05\x12\x037\x02\x18\x1a\
809    \x7f\x20The\x20user\x20agent\x20sent\x20by\x20the\x20client.\x20Example:\
810    \n\x20`\"Mozilla/4.0\x20(compatible;\x20MSIE\x206.0;\x20Windows\x2098;\
811    \x20Q312461;\x20.NET\n\x20CLR\x201.0.3705)\"`.\n\n\x0c\n\x05\x04\0\x02\
812    \x05\x05\x12\x037\x02\x08\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x037\t\x13\n\
813    \x0c\n\x05\x04\0\x02\x05\x03\x12\x037\x16\x17\n\x94\x01\n\x04\x04\0\x02\
814    \x06\x12\x03;\x02\x17\x1a\x86\x01\x20The\x20IP\x20address\x20(IPv4\x20or\
815    \x20IPv6)\x20of\x20the\x20client\x20that\x20issued\x20the\x20HTTP\n\x20r\
816    equest.\x20Examples:\x20`\"192.168.1.1\"`,\x20`\"FE80::0202:B3FF:FE1E:83\
817    29\"`.\n\n\x0c\n\x05\x04\0\x02\x06\x05\x12\x03;\x02\x08\n\x0c\n\x05\x04\
818    \0\x02\x06\x01\x12\x03;\t\x12\n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03;\x15\
819    \x16\n`\n\x04\x04\0\x02\x07\x12\x03?\x02\x18\x1aS\x20The\x20IP\x20addres\
820    s\x20(IPv4\x20or\x20IPv6)\x20of\x20the\x20origin\x20server\x20that\x20th\
821    e\x20request\x20was\n\x20sent\x20to.\n\n\x0c\n\x05\x04\0\x02\x07\x05\x12\
822    \x03?\x02\x08\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03?\t\x12\n\x0c\n\x05\
823    \x04\0\x02\x07\x03\x12\x03?\x15\x17\n\x9c\x01\n\x04\x04\0\x02\x08\x12\
824    \x03D\x02\x15\x1a\x8e\x01\x20The\x20referer\x20URL\x20of\x20the\x20reque\
825    st,\x20as\x20defined\x20in\n\x20[HTTP/1.1\x20Header\x20Field\n\x20Defini\
826    tions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).\n\n\x0c\
827    \n\x05\x04\0\x02\x08\x05\x12\x03D\x02\x08\n\x0c\n\x05\x04\0\x02\x08\x01\
828    \x12\x03D\t\x10\n\x0c\n\x05\x04\0\x02\x08\x03\x12\x03D\x13\x14\n\x81\x01\
829    \n\x04\x04\0\x02\t\x12\x03H\x02(\x1at\x20The\x20request\x20processing\
830    \x20latency\x20on\x20the\x20server,\x20from\x20the\x20time\x20the\x20req\
831    uest\x20was\n\x20received\x20until\x20the\x20response\x20was\x20sent.\n\
832    \n\x0c\n\x05\x04\0\x02\t\x06\x12\x03H\x02\x1a\n\x0c\n\x05\x04\0\x02\t\
833    \x01\x12\x03H\x1b\"\n\x0c\n\x05\x04\0\x02\t\x03\x12\x03H%'\n;\n\x04\x04\
834    \0\x02\n\x12\x03K\x02\x19\x1a.\x20Whether\x20or\x20not\x20a\x20cache\x20\
835    lookup\x20was\x20attempted.\n\n\x0c\n\x05\x04\0\x02\n\x05\x12\x03K\x02\
836    \x06\n\x0c\n\x05\x04\0\x02\n\x01\x12\x03K\x07\x13\n\x0c\n\x05\x04\0\x02\
837    \n\x03\x12\x03K\x16\x18\n\\\n\x04\x04\0\x02\x0b\x12\x03O\x02\x15\x1aO\
838    \x20Whether\x20or\x20not\x20an\x20entity\x20was\x20served\x20from\x20cac\
839    he\n\x20(with\x20or\x20without\x20validation).\n\n\x0c\n\x05\x04\0\x02\
840    \x0b\x05\x12\x03O\x02\x06\n\x0c\n\x05\x04\0\x02\x0b\x01\x12\x03O\x07\x10\
841    \n\x0c\n\x05\x04\0\x02\x0b\x03\x12\x03O\x13\x14\n\xa8\x01\n\x04\x04\0\
842    \x02\x0c\x12\x03T\x02/\x1a\x9a\x01\x20Whether\x20or\x20not\x20the\x20res\
843    ponse\x20was\x20validated\x20with\x20the\x20origin\x20server\x20before\n\
844    \x20being\x20served\x20from\x20cache.\x20This\x20field\x20is\x20only\x20\
845    meaningful\x20if\x20`cache_hit`\x20is\n\x20True.\n\n\x0c\n\x05\x04\0\x02\
846    \x0c\x05\x12\x03T\x02\x06\n\x0c\n\x05\x04\0\x02\x0c\x01\x12\x03T\x07)\n\
847    \x0c\n\x05\x04\0\x02\x0c\x03\x12\x03T,.\np\n\x04\x04\0\x02\r\x12\x03X\
848    \x02\x1e\x1ac\x20The\x20number\x20of\x20HTTP\x20response\x20bytes\x20ins\
849    erted\x20into\x20cache.\x20Set\x20only\x20when\x20a\n\x20cache\x20fill\
850    \x20was\x20attempted.\n\n\x0c\n\x05\x04\0\x02\r\x05\x12\x03X\x02\x07\n\
851    \x0c\n\x05\x04\0\x02\r\x01\x12\x03X\x08\x18\n\x0c\n\x05\x04\0\x02\r\x03\
852    \x12\x03X\x1b\x1d\nY\n\x04\x04\0\x02\x0e\x12\x03[\x02\x17\x1aL\x20Protoc\
853    ol\x20used\x20for\x20the\x20request.\x20Examples:\x20\"HTTP/1.1\",\x20\"\
854    HTTP/2\",\x20\"websocket\"\n\n\x0c\n\x05\x04\0\x02\x0e\x05\x12\x03[\x02\
855    \x08\n\x0c\n\x05\x04\0\x02\x0e\x01\x12\x03[\t\x11\n\x0c\n\x05\x04\0\x02\
856    \x0e\x03\x12\x03[\x14\x16b\x06proto3\
857";
858
859static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
860
861fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
862    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
863}
864
865pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
866    file_descriptor_proto_lazy.get(|| {
867        parse_descriptor_proto()
868    })
869}