google_cloud_rpc_context/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::AttributeContext {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22        let mut debug_struct = f.debug_struct("AttributeContext");
23        debug_struct.field("origin", &self.origin);
24        debug_struct.field("source", &self.source);
25        debug_struct.field("destination", &self.destination);
26        debug_struct.field("request", &self.request);
27        debug_struct.field("response", &self.response);
28        debug_struct.field("resource", &self.resource);
29        debug_struct.field("api", &self.api);
30        debug_struct.field("extensions", &self.extensions);
31        if !self._unknown_fields.is_empty() {
32            debug_struct.field("_unknown_fields", &self._unknown_fields);
33        }
34        debug_struct.finish()
35    }
36}
37
38impl std::fmt::Debug for super::attribute_context::Peer {
39    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
40        let mut debug_struct = f.debug_struct("Peer");
41        debug_struct.field("ip", &self.ip);
42        debug_struct.field("port", &self.port);
43        debug_struct.field("labels", &self.labels);
44        debug_struct.field("principal", &self.principal);
45        debug_struct.field("region_code", &self.region_code);
46        if !self._unknown_fields.is_empty() {
47            debug_struct.field("_unknown_fields", &self._unknown_fields);
48        }
49        debug_struct.finish()
50    }
51}
52
53impl std::fmt::Debug for super::attribute_context::Api {
54    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
55        let mut debug_struct = f.debug_struct("Api");
56        debug_struct.field("service", &self.service);
57        debug_struct.field("operation", &self.operation);
58        debug_struct.field("protocol", &self.protocol);
59        debug_struct.field("version", &self.version);
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::attribute_context::Auth {
68    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
69        let mut debug_struct = f.debug_struct("Auth");
70        debug_struct.field("principal", &self.principal);
71        debug_struct.field("audiences", &self.audiences);
72        debug_struct.field("presenter", &self.presenter);
73        debug_struct.field("claims", &self.claims);
74        debug_struct.field("access_levels", &self.access_levels);
75        if !self._unknown_fields.is_empty() {
76            debug_struct.field("_unknown_fields", &self._unknown_fields);
77        }
78        debug_struct.finish()
79    }
80}
81
82impl std::fmt::Debug for super::attribute_context::Request {
83    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
84        let mut debug_struct = f.debug_struct("Request");
85        debug_struct.field("id", &self.id);
86        debug_struct.field("method", &self.method);
87        debug_struct.field("headers", &self.headers);
88        debug_struct.field("path", &self.path);
89        debug_struct.field("host", &self.host);
90        debug_struct.field("scheme", &self.scheme);
91        debug_struct.field("query", &self.query);
92        debug_struct.field("time", &self.time);
93        debug_struct.field("size", &self.size);
94        debug_struct.field("protocol", &self.protocol);
95        debug_struct.field("reason", &self.reason);
96        debug_struct.field("auth", &self.auth);
97        if !self._unknown_fields.is_empty() {
98            debug_struct.field("_unknown_fields", &self._unknown_fields);
99        }
100        debug_struct.finish()
101    }
102}
103
104impl std::fmt::Debug for super::attribute_context::Response {
105    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
106        let mut debug_struct = f.debug_struct("Response");
107        debug_struct.field("code", &self.code);
108        debug_struct.field("size", &self.size);
109        debug_struct.field("headers", &self.headers);
110        debug_struct.field("time", &self.time);
111        debug_struct.field("backend_latency", &self.backend_latency);
112        if !self._unknown_fields.is_empty() {
113            debug_struct.field("_unknown_fields", &self._unknown_fields);
114        }
115        debug_struct.finish()
116    }
117}
118
119impl std::fmt::Debug for super::attribute_context::Resource {
120    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
121        let mut debug_struct = f.debug_struct("Resource");
122        debug_struct.field("service", &self.service);
123        debug_struct.field("name", &self.name);
124        debug_struct.field("r#type", &self.r#type);
125        debug_struct.field("labels", &self.labels);
126        debug_struct.field("uid", &self.uid);
127        debug_struct.field("annotations", &self.annotations);
128        debug_struct.field("display_name", &self.display_name);
129        debug_struct.field("create_time", &self.create_time);
130        debug_struct.field("update_time", &self.update_time);
131        debug_struct.field("delete_time", &self.delete_time);
132        debug_struct.field("etag", &self.etag);
133        debug_struct.field("location", &self.location);
134        if !self._unknown_fields.is_empty() {
135            debug_struct.field("_unknown_fields", &self._unknown_fields);
136        }
137        debug_struct.finish()
138    }
139}
140
141impl std::fmt::Debug for super::AuditContext {
142    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
143        let mut debug_struct = f.debug_struct("AuditContext");
144        debug_struct.field("audit_log", &self.audit_log);
145        debug_struct.field("scrubbed_request", &self.scrubbed_request);
146        debug_struct.field("scrubbed_response", &self.scrubbed_response);
147        debug_struct.field(
148            "scrubbed_response_item_count",
149            &self.scrubbed_response_item_count,
150        );
151        debug_struct.field("target_resource", &self.target_resource);
152        if !self._unknown_fields.is_empty() {
153            debug_struct.field("_unknown_fields", &self._unknown_fields);
154        }
155        debug_struct.finish()
156    }
157}