#[non_exhaustive]pub struct AuditContext {
pub audit_log: Bytes,
pub scrubbed_request: Option<Struct>,
pub scrubbed_response: Option<Struct>,
pub scrubbed_response_item_count: i32,
pub target_resource: String,
/* private fields */
}Expand description
AuditContext provides information that is needed for audit logging.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.audit_log: BytesSerialized audit log.
scrubbed_request: Option<Struct>An API request message that is scrubbed based on the method annotation. This field should only be filled if audit_log field is present. Service Control will use this to assemble a complete log for Cloud Audit Logs and Google internal audit logs.
scrubbed_response: Option<Struct>An API response message that is scrubbed based on the method annotation. This field should only be filled if audit_log field is present. Service Control will use this to assemble a complete log for Cloud Audit Logs and Google internal audit logs.
scrubbed_response_item_count: i32Number of scrubbed response items.
target_resource: StringAudit resource name which is scrubbed.
Implementations§
Source§impl AuditContext
impl AuditContext
pub fn new() -> Self
Sourcepub fn set_audit_log<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_audit_log<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn set_scrubbed_request<T>(self, v: T) -> Self
pub fn set_scrubbed_request<T>(self, v: T) -> Self
Sets the value of scrubbed_request.
§Example
use wkt::Struct;
let x = AuditContext::new().set_scrubbed_request(Struct::default()/* use setters */);Sourcepub fn set_or_clear_scrubbed_request<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_scrubbed_request<T>(self, v: Option<T>) -> Self
Sets or clears the value of scrubbed_request.
§Example
use wkt::Struct;
let x = AuditContext::new().set_or_clear_scrubbed_request(Some(Struct::default()/* use setters */));
let x = AuditContext::new().set_or_clear_scrubbed_request(None::<Struct>);Sourcepub fn set_scrubbed_response<T>(self, v: T) -> Self
pub fn set_scrubbed_response<T>(self, v: T) -> Self
Sets the value of scrubbed_response.
§Example
use wkt::Struct;
let x = AuditContext::new().set_scrubbed_response(Struct::default()/* use setters */);Sourcepub fn set_or_clear_scrubbed_response<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_scrubbed_response<T>(self, v: Option<T>) -> Self
Sets or clears the value of scrubbed_response.
§Example
use wkt::Struct;
let x = AuditContext::new().set_or_clear_scrubbed_response(Some(Struct::default()/* use setters */));
let x = AuditContext::new().set_or_clear_scrubbed_response(None::<Struct>);Sourcepub fn set_scrubbed_response_item_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_scrubbed_response_item_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of scrubbed_response_item_count.
§Example
let x = AuditContext::new().set_scrubbed_response_item_count(42);Sourcepub fn set_target_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_target_resource<T: Into<String>>(self, v: T) -> Self
Sets the value of target_resource.
§Example
let x = AuditContext::new().set_target_resource("example");Trait Implementations§
Source§impl Clone for AuditContext
impl Clone for AuditContext
Source§fn clone(&self) -> AuditContext
fn clone(&self) -> AuditContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more