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

/// <p>A behavior assessment of the guardrail policies used in a call to the Converse API.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GuardrailAssessment {
    /// <p>The topic policy.</p>
    pub topic_policy: ::std::option::Option<crate::types::GuardrailTopicPolicyAssessment>,
    /// <p>The content policy.</p>
    pub content_policy: ::std::option::Option<crate::types::GuardrailContentPolicyAssessment>,
    /// <p>The word policy.</p>
    pub word_policy: ::std::option::Option<crate::types::GuardrailWordPolicyAssessment>,
    /// <p>The sensitive information policy.</p>
    pub sensitive_information_policy: ::std::option::Option<crate::types::GuardrailSensitiveInformationPolicyAssessment>,
    /// <p>The contextual grounding policy used for the guardrail assessment.</p>
    pub contextual_grounding_policy: ::std::option::Option<crate::types::GuardrailContextualGroundingPolicyAssessment>,
    /// <p>The automated reasoning policy assessment results, including logical validation findings for the input content.</p>
    pub automated_reasoning_policy: ::std::option::Option<crate::types::GuardrailAutomatedReasoningPolicyAssessment>,
    /// <p>The invocation metrics for the guardrail assessment.</p>
    pub invocation_metrics: ::std::option::Option<crate::types::GuardrailInvocationMetrics>,
}
impl GuardrailAssessment {
    /// <p>The topic policy.</p>
    pub fn topic_policy(&self) -> ::std::option::Option<&crate::types::GuardrailTopicPolicyAssessment> {
        self.topic_policy.as_ref()
    }
    /// <p>The content policy.</p>
    pub fn content_policy(&self) -> ::std::option::Option<&crate::types::GuardrailContentPolicyAssessment> {
        self.content_policy.as_ref()
    }
    /// <p>The word policy.</p>
    pub fn word_policy(&self) -> ::std::option::Option<&crate::types::GuardrailWordPolicyAssessment> {
        self.word_policy.as_ref()
    }
    /// <p>The sensitive information policy.</p>
    pub fn sensitive_information_policy(&self) -> ::std::option::Option<&crate::types::GuardrailSensitiveInformationPolicyAssessment> {
        self.sensitive_information_policy.as_ref()
    }
    /// <p>The contextual grounding policy used for the guardrail assessment.</p>
    pub fn contextual_grounding_policy(&self) -> ::std::option::Option<&crate::types::GuardrailContextualGroundingPolicyAssessment> {
        self.contextual_grounding_policy.as_ref()
    }
    /// <p>The automated reasoning policy assessment results, including logical validation findings for the input content.</p>
    pub fn automated_reasoning_policy(&self) -> ::std::option::Option<&crate::types::GuardrailAutomatedReasoningPolicyAssessment> {
        self.automated_reasoning_policy.as_ref()
    }
    /// <p>The invocation metrics for the guardrail assessment.</p>
    pub fn invocation_metrics(&self) -> ::std::option::Option<&crate::types::GuardrailInvocationMetrics> {
        self.invocation_metrics.as_ref()
    }
}
impl GuardrailAssessment {
    /// Creates a new builder-style object to manufacture [`GuardrailAssessment`](crate::types::GuardrailAssessment).
    pub fn builder() -> crate::types::builders::GuardrailAssessmentBuilder {
        crate::types::builders::GuardrailAssessmentBuilder::default()
    }
}

/// A builder for [`GuardrailAssessment`](crate::types::GuardrailAssessment).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GuardrailAssessmentBuilder {
    pub(crate) topic_policy: ::std::option::Option<crate::types::GuardrailTopicPolicyAssessment>,
    pub(crate) content_policy: ::std::option::Option<crate::types::GuardrailContentPolicyAssessment>,
    pub(crate) word_policy: ::std::option::Option<crate::types::GuardrailWordPolicyAssessment>,
    pub(crate) sensitive_information_policy: ::std::option::Option<crate::types::GuardrailSensitiveInformationPolicyAssessment>,
    pub(crate) contextual_grounding_policy: ::std::option::Option<crate::types::GuardrailContextualGroundingPolicyAssessment>,
    pub(crate) automated_reasoning_policy: ::std::option::Option<crate::types::GuardrailAutomatedReasoningPolicyAssessment>,
    pub(crate) invocation_metrics: ::std::option::Option<crate::types::GuardrailInvocationMetrics>,
}
impl GuardrailAssessmentBuilder {
    /// <p>The topic policy.</p>
    pub fn topic_policy(mut self, input: crate::types::GuardrailTopicPolicyAssessment) -> Self {
        self.topic_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The topic policy.</p>
    pub fn set_topic_policy(mut self, input: ::std::option::Option<crate::types::GuardrailTopicPolicyAssessment>) -> Self {
        self.topic_policy = input;
        self
    }
    /// <p>The topic policy.</p>
    pub fn get_topic_policy(&self) -> &::std::option::Option<crate::types::GuardrailTopicPolicyAssessment> {
        &self.topic_policy
    }
    /// <p>The content policy.</p>
    pub fn content_policy(mut self, input: crate::types::GuardrailContentPolicyAssessment) -> Self {
        self.content_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The content policy.</p>
    pub fn set_content_policy(mut self, input: ::std::option::Option<crate::types::GuardrailContentPolicyAssessment>) -> Self {
        self.content_policy = input;
        self
    }
    /// <p>The content policy.</p>
    pub fn get_content_policy(&self) -> &::std::option::Option<crate::types::GuardrailContentPolicyAssessment> {
        &self.content_policy
    }
    /// <p>The word policy.</p>
    pub fn word_policy(mut self, input: crate::types::GuardrailWordPolicyAssessment) -> Self {
        self.word_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The word policy.</p>
    pub fn set_word_policy(mut self, input: ::std::option::Option<crate::types::GuardrailWordPolicyAssessment>) -> Self {
        self.word_policy = input;
        self
    }
    /// <p>The word policy.</p>
    pub fn get_word_policy(&self) -> &::std::option::Option<crate::types::GuardrailWordPolicyAssessment> {
        &self.word_policy
    }
    /// <p>The sensitive information policy.</p>
    pub fn sensitive_information_policy(mut self, input: crate::types::GuardrailSensitiveInformationPolicyAssessment) -> Self {
        self.sensitive_information_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sensitive information policy.</p>
    pub fn set_sensitive_information_policy(
        mut self,
        input: ::std::option::Option<crate::types::GuardrailSensitiveInformationPolicyAssessment>,
    ) -> Self {
        self.sensitive_information_policy = input;
        self
    }
    /// <p>The sensitive information policy.</p>
    pub fn get_sensitive_information_policy(&self) -> &::std::option::Option<crate::types::GuardrailSensitiveInformationPolicyAssessment> {
        &self.sensitive_information_policy
    }
    /// <p>The contextual grounding policy used for the guardrail assessment.</p>
    pub fn contextual_grounding_policy(mut self, input: crate::types::GuardrailContextualGroundingPolicyAssessment) -> Self {
        self.contextual_grounding_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The contextual grounding policy used for the guardrail assessment.</p>
    pub fn set_contextual_grounding_policy(
        mut self,
        input: ::std::option::Option<crate::types::GuardrailContextualGroundingPolicyAssessment>,
    ) -> Self {
        self.contextual_grounding_policy = input;
        self
    }
    /// <p>The contextual grounding policy used for the guardrail assessment.</p>
    pub fn get_contextual_grounding_policy(&self) -> &::std::option::Option<crate::types::GuardrailContextualGroundingPolicyAssessment> {
        &self.contextual_grounding_policy
    }
    /// <p>The automated reasoning policy assessment results, including logical validation findings for the input content.</p>
    pub fn automated_reasoning_policy(mut self, input: crate::types::GuardrailAutomatedReasoningPolicyAssessment) -> Self {
        self.automated_reasoning_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The automated reasoning policy assessment results, including logical validation findings for the input content.</p>
    pub fn set_automated_reasoning_policy(mut self, input: ::std::option::Option<crate::types::GuardrailAutomatedReasoningPolicyAssessment>) -> Self {
        self.automated_reasoning_policy = input;
        self
    }
    /// <p>The automated reasoning policy assessment results, including logical validation findings for the input content.</p>
    pub fn get_automated_reasoning_policy(&self) -> &::std::option::Option<crate::types::GuardrailAutomatedReasoningPolicyAssessment> {
        &self.automated_reasoning_policy
    }
    /// <p>The invocation metrics for the guardrail assessment.</p>
    pub fn invocation_metrics(mut self, input: crate::types::GuardrailInvocationMetrics) -> Self {
        self.invocation_metrics = ::std::option::Option::Some(input);
        self
    }
    /// <p>The invocation metrics for the guardrail assessment.</p>
    pub fn set_invocation_metrics(mut self, input: ::std::option::Option<crate::types::GuardrailInvocationMetrics>) -> Self {
        self.invocation_metrics = input;
        self
    }
    /// <p>The invocation metrics for the guardrail assessment.</p>
    pub fn get_invocation_metrics(&self) -> &::std::option::Option<crate::types::GuardrailInvocationMetrics> {
        &self.invocation_metrics
    }
    /// Consumes the builder and constructs a [`GuardrailAssessment`](crate::types::GuardrailAssessment).
    pub fn build(self) -> crate::types::GuardrailAssessment {
        crate::types::GuardrailAssessment {
            topic_policy: self.topic_policy,
            content_policy: self.content_policy,
            word_policy: self.word_policy,
            sensitive_information_policy: self.sensitive_information_policy,
            contextual_grounding_policy: self.contextual_grounding_policy,
            automated_reasoning_policy: self.automated_reasoning_policy,
            invocation_metrics: self.invocation_metrics,
        }
    }
}
