google-cloud-rpc-context 1.4.0

Google Cloud Client Libraries for Rust - RPC Audit and Logging Attributes
Documentation
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;

impl std::fmt::Debug for super::AttributeContext {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AttributeContext");
        debug_struct.field("origin", &self.origin);
        debug_struct.field("source", &self.source);
        debug_struct.field("destination", &self.destination);
        debug_struct.field("request", &self.request);
        debug_struct.field("response", &self.response);
        debug_struct.field("resource", &self.resource);
        debug_struct.field("api", &self.api);
        debug_struct.field("extensions", &self.extensions);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Peer {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Peer");
        debug_struct.field("ip", &self.ip);
        debug_struct.field("port", &self.port);
        debug_struct.field("labels", &self.labels);
        debug_struct.field("principal", &self.principal);
        debug_struct.field("region_code", &self.region_code);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Api {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Api");
        debug_struct.field("service", &self.service);
        debug_struct.field("operation", &self.operation);
        debug_struct.field("protocol", &self.protocol);
        debug_struct.field("version", &self.version);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Auth {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Auth");
        debug_struct.field("principal", &self.principal);
        debug_struct.field("audiences", &self.audiences);
        debug_struct.field("presenter", &self.presenter);
        debug_struct.field("claims", &self.claims);
        debug_struct.field("access_levels", &self.access_levels);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Request {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Request");
        debug_struct.field("id", &self.id);
        debug_struct.field("method", &self.method);
        debug_struct.field("headers", &self.headers);
        debug_struct.field("path", &self.path);
        debug_struct.field("host", &self.host);
        debug_struct.field("scheme", &self.scheme);
        debug_struct.field("query", &self.query);
        debug_struct.field("time", &self.time);
        debug_struct.field("size", &self.size);
        debug_struct.field("protocol", &self.protocol);
        debug_struct.field("reason", &self.reason);
        debug_struct.field("auth", &self.auth);
        debug_struct.field("origin", &self.origin);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Response {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Response");
        debug_struct.field("code", &self.code);
        debug_struct.field("size", &self.size);
        debug_struct.field("headers", &self.headers);
        debug_struct.field("time", &self.time);
        debug_struct.field("backend_latency", &self.backend_latency);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::attribute_context::Resource {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("Resource");
        debug_struct.field("service", &self.service);
        debug_struct.field("name", &self.name);
        debug_struct.field("r#type", &self.r#type);
        debug_struct.field("labels", &self.labels);
        debug_struct.field("uid", &self.uid);
        debug_struct.field("annotations", &self.annotations);
        debug_struct.field("display_name", &self.display_name);
        debug_struct.field("create_time", &self.create_time);
        debug_struct.field("update_time", &self.update_time);
        debug_struct.field("delete_time", &self.delete_time);
        debug_struct.field("etag", &self.etag);
        debug_struct.field("location", &self.location);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}

impl std::fmt::Debug for super::AuditContext {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("AuditContext");
        debug_struct.field("audit_log", &self.audit_log);
        debug_struct.field("scrubbed_request", &self.scrubbed_request);
        debug_struct.field("scrubbed_response", &self.scrubbed_response);
        debug_struct.field(
            "scrubbed_response_item_count",
            &self.scrubbed_response_item_count,
        );
        debug_struct.field("target_resource", &self.target_resource);
        if !self._unknown_fields.is_empty() {
            debug_struct.field("_unknown_fields", &self._unknown_fields);
        }
        debug_struct.finish()
    }
}