aws-sdk-bedrock 1.143.0

AWS SDK for Amazon Bedrock
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetGuardrailInput {
    /// <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
    pub guardrail_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the <code>DRAFT</code> version.</p>
    pub guardrail_version: ::std::option::Option<::std::string::String>,
}
impl GetGuardrailInput {
    /// <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
    pub fn guardrail_identifier(&self) -> ::std::option::Option<&str> {
        self.guardrail_identifier.as_deref()
    }
    /// <p>The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the <code>DRAFT</code> version.</p>
    pub fn guardrail_version(&self) -> ::std::option::Option<&str> {
        self.guardrail_version.as_deref()
    }
}
impl GetGuardrailInput {
    /// Creates a new builder-style object to manufacture [`GetGuardrailInput`](crate::operation::get_guardrail::GetGuardrailInput).
    pub fn builder() -> crate::operation::get_guardrail::builders::GetGuardrailInputBuilder {
        crate::operation::get_guardrail::builders::GetGuardrailInputBuilder::default()
    }
}

/// A builder for [`GetGuardrailInput`](crate::operation::get_guardrail::GetGuardrailInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetGuardrailInputBuilder {
    pub(crate) guardrail_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) guardrail_version: ::std::option::Option<::std::string::String>,
}
impl GetGuardrailInputBuilder {
    /// <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
    /// This field is required.
    pub fn guardrail_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.guardrail_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
    pub fn set_guardrail_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.guardrail_identifier = input;
        self
    }
    /// <p>The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.</p>
    pub fn get_guardrail_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.guardrail_identifier
    }
    /// <p>The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the <code>DRAFT</code> version.</p>
    pub fn guardrail_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.guardrail_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the <code>DRAFT</code> version.</p>
    pub fn set_guardrail_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.guardrail_version = input;
        self
    }
    /// <p>The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the <code>DRAFT</code> version.</p>
    pub fn get_guardrail_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.guardrail_version
    }
    /// Consumes the builder and constructs a [`GetGuardrailInput`](crate::operation::get_guardrail::GetGuardrailInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_guardrail::GetGuardrailInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_guardrail::GetGuardrailInput {
            guardrail_identifier: self.guardrail_identifier,
            guardrail_version: self.guardrail_version,
        })
    }
}