asGuardrail
Casts this RetrieveAndGenerateStreamResponseOutput as a Guardrail and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.GuardrailEvent value. Throws an exception if the RetrieveAndGenerateStreamResponseOutput is not a Guardrail.