// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The invocation metrics for the guardrail.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GuardrailInvocationMetrics {
    /// <p>The processing latency details for the guardrail invocation metrics.</p>
    pub guardrail_processing_latency: ::std::option::Option<i64>,
    /// <p>The usage details for the guardrail invocation metrics.</p>
    pub usage: ::std::option::Option<crate::types::GuardrailUsage>,
    /// <p>The coverage details for the guardrail invocation metrics.</p>
    pub guardrail_coverage: ::std::option::Option<crate::types::GuardrailCoverage>,
}
impl GuardrailInvocationMetrics {
    /// <p>The processing latency details for the guardrail invocation metrics.</p>
    pub fn guardrail_processing_latency(&self) -> ::std::option::Option<i64> {
        self.guardrail_processing_latency
    }
    /// <p>The usage details for the guardrail invocation metrics.</p>
    pub fn usage(&self) -> ::std::option::Option<&crate::types::GuardrailUsage> {
        self.usage.as_ref()
    }
    /// <p>The coverage details for the guardrail invocation metrics.</p>
    pub fn guardrail_coverage(&self) -> ::std::option::Option<&crate::types::GuardrailCoverage> {
        self.guardrail_coverage.as_ref()
    }
}
impl GuardrailInvocationMetrics {
    /// Creates a new builder-style object to manufacture [`GuardrailInvocationMetrics`](crate::types::GuardrailInvocationMetrics).
    pub fn builder() -> crate::types::builders::GuardrailInvocationMetricsBuilder {
        crate::types::builders::GuardrailInvocationMetricsBuilder::default()
    }
}

/// A builder for [`GuardrailInvocationMetrics`](crate::types::GuardrailInvocationMetrics).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GuardrailInvocationMetricsBuilder {
    pub(crate) guardrail_processing_latency: ::std::option::Option<i64>,
    pub(crate) usage: ::std::option::Option<crate::types::GuardrailUsage>,
    pub(crate) guardrail_coverage: ::std::option::Option<crate::types::GuardrailCoverage>,
}
impl GuardrailInvocationMetricsBuilder {
    /// <p>The processing latency details for the guardrail invocation metrics.</p>
    pub fn guardrail_processing_latency(mut self, input: i64) -> Self {
        self.guardrail_processing_latency = ::std::option::Option::Some(input);
        self
    }
    /// <p>The processing latency details for the guardrail invocation metrics.</p>
    pub fn set_guardrail_processing_latency(mut self, input: ::std::option::Option<i64>) -> Self {
        self.guardrail_processing_latency = input;
        self
    }
    /// <p>The processing latency details for the guardrail invocation metrics.</p>
    pub fn get_guardrail_processing_latency(&self) -> &::std::option::Option<i64> {
        &self.guardrail_processing_latency
    }
    /// <p>The usage details for the guardrail invocation metrics.</p>
    pub fn usage(mut self, input: crate::types::GuardrailUsage) -> Self {
        self.usage = ::std::option::Option::Some(input);
        self
    }
    /// <p>The usage details for the guardrail invocation metrics.</p>
    pub fn set_usage(mut self, input: ::std::option::Option<crate::types::GuardrailUsage>) -> Self {
        self.usage = input;
        self
    }
    /// <p>The usage details for the guardrail invocation metrics.</p>
    pub fn get_usage(&self) -> &::std::option::Option<crate::types::GuardrailUsage> {
        &self.usage
    }
    /// <p>The coverage details for the guardrail invocation metrics.</p>
    pub fn guardrail_coverage(mut self, input: crate::types::GuardrailCoverage) -> Self {
        self.guardrail_coverage = ::std::option::Option::Some(input);
        self
    }
    /// <p>The coverage details for the guardrail invocation metrics.</p>
    pub fn set_guardrail_coverage(mut self, input: ::std::option::Option<crate::types::GuardrailCoverage>) -> Self {
        self.guardrail_coverage = input;
        self
    }
    /// <p>The coverage details for the guardrail invocation metrics.</p>
    pub fn get_guardrail_coverage(&self) -> &::std::option::Option<crate::types::GuardrailCoverage> {
        &self.guardrail_coverage
    }
    /// Consumes the builder and constructs a [`GuardrailInvocationMetrics`](crate::types::GuardrailInvocationMetrics).
    pub fn build(self) -> crate::types::GuardrailInvocationMetrics {
        crate::types::GuardrailInvocationMetrics {
            guardrail_processing_latency: self.guardrail_processing_latency,
            usage: self.usage,
            guardrail_coverage: self.guardrail_coverage,
        }
    }
}
