Skip to main content

google_cloud_api_servicecontrol_v1/model/
debug.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#[allow(unused_imports)]
18use super::*;
19
20impl std::fmt::Debug for super::CheckError {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22        let mut debug_struct = f.debug_struct("CheckError");
23        debug_struct.field("code", &self.code);
24        debug_struct.field("subject", &self.subject);
25        debug_struct.field("detail", &self.detail);
26        debug_struct.field("status", &self.status);
27        if !self._unknown_fields.is_empty() {
28            debug_struct.field("_unknown_fields", &self._unknown_fields);
29        }
30        debug_struct.finish()
31    }
32}
33
34impl std::fmt::Debug for super::Distribution {
35    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
36        let mut debug_struct = f.debug_struct("Distribution");
37        debug_struct.field("count", &self.count);
38        debug_struct.field("mean", &self.mean);
39        debug_struct.field("minimum", &self.minimum);
40        debug_struct.field("maximum", &self.maximum);
41        debug_struct.field("sum_of_squared_deviation", &self.sum_of_squared_deviation);
42        debug_struct.field("bucket_counts", &self.bucket_counts);
43        debug_struct.field("exemplars", &self.exemplars);
44        debug_struct.field("bucket_option", &self.bucket_option);
45        if !self._unknown_fields.is_empty() {
46            debug_struct.field("_unknown_fields", &self._unknown_fields);
47        }
48        debug_struct.finish()
49    }
50}
51
52impl std::fmt::Debug for super::distribution::LinearBuckets {
53    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
54        let mut debug_struct = f.debug_struct("LinearBuckets");
55        debug_struct.field("num_finite_buckets", &self.num_finite_buckets);
56        debug_struct.field("width", &self.width);
57        debug_struct.field("offset", &self.offset);
58        if !self._unknown_fields.is_empty() {
59            debug_struct.field("_unknown_fields", &self._unknown_fields);
60        }
61        debug_struct.finish()
62    }
63}
64
65impl std::fmt::Debug for super::distribution::ExponentialBuckets {
66    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
67        let mut debug_struct = f.debug_struct("ExponentialBuckets");
68        debug_struct.field("num_finite_buckets", &self.num_finite_buckets);
69        debug_struct.field("growth_factor", &self.growth_factor);
70        debug_struct.field("scale", &self.scale);
71        if !self._unknown_fields.is_empty() {
72            debug_struct.field("_unknown_fields", &self._unknown_fields);
73        }
74        debug_struct.finish()
75    }
76}
77
78impl std::fmt::Debug for super::distribution::ExplicitBuckets {
79    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
80        let mut debug_struct = f.debug_struct("ExplicitBuckets");
81        debug_struct.field("bounds", &self.bounds);
82        if !self._unknown_fields.is_empty() {
83            debug_struct.field("_unknown_fields", &self._unknown_fields);
84        }
85        debug_struct.finish()
86    }
87}
88
89impl std::fmt::Debug for super::HttpRequest {
90    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
91        let mut debug_struct = f.debug_struct("HttpRequest");
92        debug_struct.field("request_method", &self.request_method);
93        debug_struct.field("request_url", &self.request_url);
94        debug_struct.field("request_size", &self.request_size);
95        debug_struct.field("status", &self.status);
96        debug_struct.field("response_size", &self.response_size);
97        debug_struct.field("user_agent", &self.user_agent);
98        debug_struct.field("remote_ip", &self.remote_ip);
99        debug_struct.field("server_ip", &self.server_ip);
100        debug_struct.field("referer", &self.referer);
101        debug_struct.field("latency", &self.latency);
102        debug_struct.field("cache_lookup", &self.cache_lookup);
103        debug_struct.field("cache_hit", &self.cache_hit);
104        debug_struct.field(
105            "cache_validated_with_origin_server",
106            &self.cache_validated_with_origin_server,
107        );
108        debug_struct.field("cache_fill_bytes", &self.cache_fill_bytes);
109        debug_struct.field("protocol", &self.protocol);
110        if !self._unknown_fields.is_empty() {
111            debug_struct.field("_unknown_fields", &self._unknown_fields);
112        }
113        debug_struct.finish()
114    }
115}
116
117impl std::fmt::Debug for super::LogEntry {
118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
119        let mut debug_struct = f.debug_struct("LogEntry");
120        debug_struct.field("name", &self.name);
121        debug_struct.field("timestamp", &self.timestamp);
122        debug_struct.field("severity", &self.severity);
123        debug_struct.field("http_request", &self.http_request);
124        debug_struct.field("trace", &self.trace);
125        debug_struct.field("insert_id", &self.insert_id);
126        debug_struct.field("labels", &self.labels);
127        debug_struct.field("operation", &self.operation);
128        debug_struct.field("source_location", &self.source_location);
129        debug_struct.field("payload", &self.payload);
130        if !self._unknown_fields.is_empty() {
131            debug_struct.field("_unknown_fields", &self._unknown_fields);
132        }
133        debug_struct.finish()
134    }
135}
136
137impl std::fmt::Debug for super::LogEntryOperation {
138    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
139        let mut debug_struct = f.debug_struct("LogEntryOperation");
140        debug_struct.field("id", &self.id);
141        debug_struct.field("producer", &self.producer);
142        debug_struct.field("first", &self.first);
143        debug_struct.field("last", &self.last);
144        if !self._unknown_fields.is_empty() {
145            debug_struct.field("_unknown_fields", &self._unknown_fields);
146        }
147        debug_struct.finish()
148    }
149}
150
151impl std::fmt::Debug for super::LogEntrySourceLocation {
152    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
153        let mut debug_struct = f.debug_struct("LogEntrySourceLocation");
154        debug_struct.field("file", &self.file);
155        debug_struct.field("line", &self.line);
156        debug_struct.field("function", &self.function);
157        if !self._unknown_fields.is_empty() {
158            debug_struct.field("_unknown_fields", &self._unknown_fields);
159        }
160        debug_struct.finish()
161    }
162}
163
164impl std::fmt::Debug for super::MetricValue {
165    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
166        let mut debug_struct = f.debug_struct("MetricValue");
167        debug_struct.field("labels", &self.labels);
168        debug_struct.field("start_time", &self.start_time);
169        debug_struct.field("end_time", &self.end_time);
170        debug_struct.field("value", &self.value);
171        if !self._unknown_fields.is_empty() {
172            debug_struct.field("_unknown_fields", &self._unknown_fields);
173        }
174        debug_struct.finish()
175    }
176}
177
178impl std::fmt::Debug for super::MetricValueSet {
179    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
180        let mut debug_struct = f.debug_struct("MetricValueSet");
181        debug_struct.field("metric_name", &self.metric_name);
182        debug_struct.field("metric_values", &self.metric_values);
183        if !self._unknown_fields.is_empty() {
184            debug_struct.field("_unknown_fields", &self._unknown_fields);
185        }
186        debug_struct.finish()
187    }
188}
189
190impl std::fmt::Debug for super::Operation {
191    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
192        let mut debug_struct = f.debug_struct("Operation");
193        debug_struct.field("operation_id", &self.operation_id);
194        debug_struct.field("operation_name", &self.operation_name);
195        debug_struct.field("consumer_id", &self.consumer_id);
196        debug_struct.field("start_time", &self.start_time);
197        debug_struct.field("end_time", &self.end_time);
198        debug_struct.field("labels", &self.labels);
199        debug_struct.field("metric_value_sets", &self.metric_value_sets);
200        debug_struct.field("log_entries", &self.log_entries);
201        debug_struct.field("importance", &self.importance);
202        debug_struct.field("user_labels", &self.user_labels);
203        debug_struct.field("extensions", &self.extensions);
204        if !self._unknown_fields.is_empty() {
205            debug_struct.field("_unknown_fields", &self._unknown_fields);
206        }
207        debug_struct.finish()
208    }
209}
210
211impl std::fmt::Debug for super::AllocateQuotaRequest {
212    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
213        let mut debug_struct = f.debug_struct("AllocateQuotaRequest");
214        debug_struct.field("service_name", &self.service_name);
215        debug_struct.field("allocate_operation", &self.allocate_operation);
216        debug_struct.field("service_config_id", &self.service_config_id);
217        if !self._unknown_fields.is_empty() {
218            debug_struct.field("_unknown_fields", &self._unknown_fields);
219        }
220        debug_struct.finish()
221    }
222}
223
224impl std::fmt::Debug for super::QuotaOperation {
225    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
226        let mut debug_struct = f.debug_struct("QuotaOperation");
227        debug_struct.field("operation_id", &self.operation_id);
228        debug_struct.field("method_name", &self.method_name);
229        debug_struct.field("consumer_id", &self.consumer_id);
230        debug_struct.field("labels", &self.labels);
231        debug_struct.field("quota_metrics", &self.quota_metrics);
232        debug_struct.field("quota_mode", &self.quota_mode);
233        if !self._unknown_fields.is_empty() {
234            debug_struct.field("_unknown_fields", &self._unknown_fields);
235        }
236        debug_struct.finish()
237    }
238}
239
240impl std::fmt::Debug for super::AllocateQuotaResponse {
241    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
242        let mut debug_struct = f.debug_struct("AllocateQuotaResponse");
243        debug_struct.field("operation_id", &self.operation_id);
244        debug_struct.field("allocate_errors", &self.allocate_errors);
245        debug_struct.field("quota_metrics", &self.quota_metrics);
246        debug_struct.field("service_config_id", &self.service_config_id);
247        if !self._unknown_fields.is_empty() {
248            debug_struct.field("_unknown_fields", &self._unknown_fields);
249        }
250        debug_struct.finish()
251    }
252}
253
254impl std::fmt::Debug for super::QuotaError {
255    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
256        let mut debug_struct = f.debug_struct("QuotaError");
257        debug_struct.field("code", &self.code);
258        debug_struct.field("subject", &self.subject);
259        debug_struct.field("description", &self.description);
260        debug_struct.field("status", &self.status);
261        if !self._unknown_fields.is_empty() {
262            debug_struct.field("_unknown_fields", &self._unknown_fields);
263        }
264        debug_struct.finish()
265    }
266}
267
268impl std::fmt::Debug for super::CheckRequest {
269    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
270        let mut debug_struct = f.debug_struct("CheckRequest");
271        debug_struct.field("service_name", &self.service_name);
272        debug_struct.field("operation", &self.operation);
273        debug_struct.field("service_config_id", &self.service_config_id);
274        if !self._unknown_fields.is_empty() {
275            debug_struct.field("_unknown_fields", &self._unknown_fields);
276        }
277        debug_struct.finish()
278    }
279}
280
281impl std::fmt::Debug for super::CheckResponse {
282    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
283        let mut debug_struct = f.debug_struct("CheckResponse");
284        debug_struct.field("operation_id", &self.operation_id);
285        debug_struct.field("check_errors", &self.check_errors);
286        debug_struct.field("service_config_id", &self.service_config_id);
287        debug_struct.field("service_rollout_id", &self.service_rollout_id);
288        debug_struct.field("check_info", &self.check_info);
289        if !self._unknown_fields.is_empty() {
290            debug_struct.field("_unknown_fields", &self._unknown_fields);
291        }
292        debug_struct.finish()
293    }
294}
295
296impl std::fmt::Debug for super::check_response::CheckInfo {
297    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
298        let mut debug_struct = f.debug_struct("CheckInfo");
299        debug_struct.field("unused_arguments", &self.unused_arguments);
300        debug_struct.field("consumer_info", &self.consumer_info);
301        debug_struct.field("api_key_uid", &self.api_key_uid);
302        if !self._unknown_fields.is_empty() {
303            debug_struct.field("_unknown_fields", &self._unknown_fields);
304        }
305        debug_struct.finish()
306    }
307}
308
309impl std::fmt::Debug for super::check_response::ConsumerInfo {
310    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
311        let mut debug_struct = f.debug_struct("ConsumerInfo");
312        debug_struct.field("project_number", &self.project_number);
313        debug_struct.field("r#type", &self.r#type);
314        debug_struct.field("consumer_number", &self.consumer_number);
315        if !self._unknown_fields.is_empty() {
316            debug_struct.field("_unknown_fields", &self._unknown_fields);
317        }
318        debug_struct.finish()
319    }
320}
321
322impl std::fmt::Debug for super::ReportRequest {
323    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
324        let mut debug_struct = f.debug_struct("ReportRequest");
325        debug_struct.field("service_name", &self.service_name);
326        debug_struct.field("operations", &self.operations);
327        debug_struct.field("service_config_id", &self.service_config_id);
328        if !self._unknown_fields.is_empty() {
329            debug_struct.field("_unknown_fields", &self._unknown_fields);
330        }
331        debug_struct.finish()
332    }
333}
334
335impl std::fmt::Debug for super::ReportResponse {
336    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
337        let mut debug_struct = f.debug_struct("ReportResponse");
338        debug_struct.field("report_errors", &self.report_errors);
339        debug_struct.field("service_config_id", &self.service_config_id);
340        debug_struct.field("service_rollout_id", &self.service_rollout_id);
341        if !self._unknown_fields.is_empty() {
342            debug_struct.field("_unknown_fields", &self._unknown_fields);
343        }
344        debug_struct.finish()
345    }
346}
347
348impl std::fmt::Debug for super::report_response::ReportError {
349    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
350        let mut debug_struct = f.debug_struct("ReportError");
351        debug_struct.field("operation_id", &self.operation_id);
352        debug_struct.field("status", &self.status);
353        if !self._unknown_fields.is_empty() {
354            debug_struct.field("_unknown_fields", &self._unknown_fields);
355        }
356        debug_struct.finish()
357    }
358}