google_cloud_rpc/model/
debug.rs

1// Copyright 2024 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::ErrorInfo {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22        let mut debug_struct = f.debug_struct("ErrorInfo");
23        debug_struct.field("reason", &self.reason);
24        debug_struct.field("domain", &self.domain);
25        debug_struct.field("metadata", &self.metadata);
26        if !self._unknown_fields.is_empty() {
27            debug_struct.field("_unknown_fields", &self._unknown_fields);
28        }
29        debug_struct.finish()
30    }
31}
32
33impl std::fmt::Debug for super::RetryInfo {
34    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35        let mut debug_struct = f.debug_struct("RetryInfo");
36        debug_struct.field("retry_delay", &self.retry_delay);
37        if !self._unknown_fields.is_empty() {
38            debug_struct.field("_unknown_fields", &self._unknown_fields);
39        }
40        debug_struct.finish()
41    }
42}
43
44impl std::fmt::Debug for super::DebugInfo {
45    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
46        let mut debug_struct = f.debug_struct("DebugInfo");
47        debug_struct.field("stack_entries", &self.stack_entries);
48        debug_struct.field("detail", &self.detail);
49        if !self._unknown_fields.is_empty() {
50            debug_struct.field("_unknown_fields", &self._unknown_fields);
51        }
52        debug_struct.finish()
53    }
54}
55
56impl std::fmt::Debug for super::QuotaFailure {
57    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
58        let mut debug_struct = f.debug_struct("QuotaFailure");
59        debug_struct.field("violations", &self.violations);
60        if !self._unknown_fields.is_empty() {
61            debug_struct.field("_unknown_fields", &self._unknown_fields);
62        }
63        debug_struct.finish()
64    }
65}
66
67impl std::fmt::Debug for super::quota_failure::Violation {
68    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
69        let mut debug_struct = f.debug_struct("Violation");
70        debug_struct.field("subject", &self.subject);
71        debug_struct.field("description", &self.description);
72        debug_struct.field("api_service", &self.api_service);
73        debug_struct.field("quota_metric", &self.quota_metric);
74        debug_struct.field("quota_id", &self.quota_id);
75        debug_struct.field("quota_dimensions", &self.quota_dimensions);
76        debug_struct.field("quota_value", &self.quota_value);
77        debug_struct.field("future_quota_value", &self.future_quota_value);
78        if !self._unknown_fields.is_empty() {
79            debug_struct.field("_unknown_fields", &self._unknown_fields);
80        }
81        debug_struct.finish()
82    }
83}
84
85impl std::fmt::Debug for super::PreconditionFailure {
86    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
87        let mut debug_struct = f.debug_struct("PreconditionFailure");
88        debug_struct.field("violations", &self.violations);
89        if !self._unknown_fields.is_empty() {
90            debug_struct.field("_unknown_fields", &self._unknown_fields);
91        }
92        debug_struct.finish()
93    }
94}
95
96impl std::fmt::Debug for super::precondition_failure::Violation {
97    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
98        let mut debug_struct = f.debug_struct("Violation");
99        debug_struct.field("r#type", &self.r#type);
100        debug_struct.field("subject", &self.subject);
101        debug_struct.field("description", &self.description);
102        if !self._unknown_fields.is_empty() {
103            debug_struct.field("_unknown_fields", &self._unknown_fields);
104        }
105        debug_struct.finish()
106    }
107}
108
109impl std::fmt::Debug for super::BadRequest {
110    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
111        let mut debug_struct = f.debug_struct("BadRequest");
112        debug_struct.field("field_violations", &self.field_violations);
113        if !self._unknown_fields.is_empty() {
114            debug_struct.field("_unknown_fields", &self._unknown_fields);
115        }
116        debug_struct.finish()
117    }
118}
119
120impl std::fmt::Debug for super::bad_request::FieldViolation {
121    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
122        let mut debug_struct = f.debug_struct("FieldViolation");
123        debug_struct.field("field", &self.field);
124        debug_struct.field("description", &self.description);
125        debug_struct.field("reason", &self.reason);
126        debug_struct.field("localized_message", &self.localized_message);
127        if !self._unknown_fields.is_empty() {
128            debug_struct.field("_unknown_fields", &self._unknown_fields);
129        }
130        debug_struct.finish()
131    }
132}
133
134impl std::fmt::Debug for super::RequestInfo {
135    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
136        let mut debug_struct = f.debug_struct("RequestInfo");
137        debug_struct.field("request_id", &self.request_id);
138        debug_struct.field("serving_data", &self.serving_data);
139        if !self._unknown_fields.is_empty() {
140            debug_struct.field("_unknown_fields", &self._unknown_fields);
141        }
142        debug_struct.finish()
143    }
144}
145
146impl std::fmt::Debug for super::ResourceInfo {
147    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
148        let mut debug_struct = f.debug_struct("ResourceInfo");
149        debug_struct.field("resource_type", &self.resource_type);
150        debug_struct.field("resource_name", &self.resource_name);
151        debug_struct.field("owner", &self.owner);
152        debug_struct.field("description", &self.description);
153        if !self._unknown_fields.is_empty() {
154            debug_struct.field("_unknown_fields", &self._unknown_fields);
155        }
156        debug_struct.finish()
157    }
158}
159
160impl std::fmt::Debug for super::Help {
161    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
162        let mut debug_struct = f.debug_struct("Help");
163        debug_struct.field("links", &self.links);
164        if !self._unknown_fields.is_empty() {
165            debug_struct.field("_unknown_fields", &self._unknown_fields);
166        }
167        debug_struct.finish()
168    }
169}
170
171impl std::fmt::Debug for super::help::Link {
172    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
173        let mut debug_struct = f.debug_struct("Link");
174        debug_struct.field("description", &self.description);
175        debug_struct.field("url", &self.url);
176        if !self._unknown_fields.is_empty() {
177            debug_struct.field("_unknown_fields", &self._unknown_fields);
178        }
179        debug_struct.finish()
180    }
181}
182
183impl std::fmt::Debug for super::LocalizedMessage {
184    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
185        let mut debug_struct = f.debug_struct("LocalizedMessage");
186        debug_struct.field("locale", &self.locale);
187        debug_struct.field("message", &self.message);
188        if !self._unknown_fields.is_empty() {
189            debug_struct.field("_unknown_fields", &self._unknown_fields);
190        }
191        debug_struct.finish()
192    }
193}
194
195impl std::fmt::Debug for super::HttpRequest {
196    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
197        let mut debug_struct = f.debug_struct("HttpRequest");
198        debug_struct.field("method", &self.method);
199        debug_struct.field("uri", &self.uri);
200        debug_struct.field("headers", &self.headers);
201        debug_struct.field("body", &self.body);
202        if !self._unknown_fields.is_empty() {
203            debug_struct.field("_unknown_fields", &self._unknown_fields);
204        }
205        debug_struct.finish()
206    }
207}
208
209impl std::fmt::Debug for super::HttpResponse {
210    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
211        let mut debug_struct = f.debug_struct("HttpResponse");
212        debug_struct.field("status", &self.status);
213        debug_struct.field("reason", &self.reason);
214        debug_struct.field("headers", &self.headers);
215        debug_struct.field("body", &self.body);
216        if !self._unknown_fields.is_empty() {
217            debug_struct.field("_unknown_fields", &self._unknown_fields);
218        }
219        debug_struct.finish()
220    }
221}
222
223impl std::fmt::Debug for super::HttpHeader {
224    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
225        let mut debug_struct = f.debug_struct("HttpHeader");
226        debug_struct.field("key", &self.key);
227        debug_struct.field("value", &self.value);
228        if !self._unknown_fields.is_empty() {
229            debug_struct.field("_unknown_fields", &self._unknown_fields);
230        }
231        debug_struct.finish()
232    }
233}
234
235impl std::fmt::Debug for super::Status {
236    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
237        let mut debug_struct = f.debug_struct("Status");
238        debug_struct.field("code", &self.code);
239        debug_struct.field("message", &self.message);
240        debug_struct.field("details", &self.details);
241        if !self._unknown_fields.is_empty() {
242            debug_struct.field("_unknown_fields", &self._unknown_fields);
243        }
244        debug_struct.finish()
245    }
246}