#[non_exhaustive]pub struct GetGuardrailOutputBuilder { /* private fields */ }Expand description
A builder for GetGuardrailOutput.
Implementations§
Source§impl GetGuardrailOutputBuilder
impl GetGuardrailOutputBuilder
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the guardrail.
This field is required.Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description of the guardrail.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description of the guardrail.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
The description of the guardrail.
Sourcepub fn guardrail_id(self, input: impl Into<String>) -> Self
pub fn guardrail_id(self, input: impl Into<String>) -> Self
The unique identifier of the guardrail.
This field is required.Sourcepub fn set_guardrail_id(self, input: Option<String>) -> Self
pub fn set_guardrail_id(self, input: Option<String>) -> Self
The unique identifier of the guardrail.
Sourcepub fn get_guardrail_id(&self) -> &Option<String>
pub fn get_guardrail_id(&self) -> &Option<String>
The unique identifier of the guardrail.
Sourcepub fn guardrail_arn(self, input: impl Into<String>) -> Self
pub fn guardrail_arn(self, input: impl Into<String>) -> Self
The ARN of the guardrail.
This field is required.Sourcepub fn set_guardrail_arn(self, input: Option<String>) -> Self
pub fn set_guardrail_arn(self, input: Option<String>) -> Self
The ARN of the guardrail.
Sourcepub fn get_guardrail_arn(&self) -> &Option<String>
pub fn get_guardrail_arn(&self) -> &Option<String>
The ARN of the guardrail.
Sourcepub fn version(self, input: impl Into<String>) -> Self
pub fn version(self, input: impl Into<String>) -> Self
The version of the guardrail.
This field is required.Sourcepub fn set_version(self, input: Option<String>) -> Self
pub fn set_version(self, input: Option<String>) -> Self
The version of the guardrail.
Sourcepub fn get_version(&self) -> &Option<String>
pub fn get_version(&self) -> &Option<String>
The version of the guardrail.
Sourcepub fn status(self, input: GuardrailStatus) -> Self
pub fn status(self, input: GuardrailStatus) -> Self
The status of the guardrail.
This field is required.Sourcepub fn set_status(self, input: Option<GuardrailStatus>) -> Self
pub fn set_status(self, input: Option<GuardrailStatus>) -> Self
The status of the guardrail.
Sourcepub fn get_status(&self) -> &Option<GuardrailStatus>
pub fn get_status(&self) -> &Option<GuardrailStatus>
The status of the guardrail.
Sourcepub fn topic_policy(self, input: GuardrailTopicPolicy) -> Self
pub fn topic_policy(self, input: GuardrailTopicPolicy) -> Self
The topic policy that was configured for the guardrail.
Sourcepub fn set_topic_policy(self, input: Option<GuardrailTopicPolicy>) -> Self
pub fn set_topic_policy(self, input: Option<GuardrailTopicPolicy>) -> Self
The topic policy that was configured for the guardrail.
Sourcepub fn get_topic_policy(&self) -> &Option<GuardrailTopicPolicy>
pub fn get_topic_policy(&self) -> &Option<GuardrailTopicPolicy>
The topic policy that was configured for the guardrail.
Sourcepub fn content_policy(self, input: GuardrailContentPolicy) -> Self
pub fn content_policy(self, input: GuardrailContentPolicy) -> Self
The content policy that was configured for the guardrail.
Sourcepub fn set_content_policy(self, input: Option<GuardrailContentPolicy>) -> Self
pub fn set_content_policy(self, input: Option<GuardrailContentPolicy>) -> Self
The content policy that was configured for the guardrail.
Sourcepub fn get_content_policy(&self) -> &Option<GuardrailContentPolicy>
pub fn get_content_policy(&self) -> &Option<GuardrailContentPolicy>
The content policy that was configured for the guardrail.
Sourcepub fn word_policy(self, input: GuardrailWordPolicy) -> Self
pub fn word_policy(self, input: GuardrailWordPolicy) -> Self
The word policy that was configured for the guardrail.
Sourcepub fn set_word_policy(self, input: Option<GuardrailWordPolicy>) -> Self
pub fn set_word_policy(self, input: Option<GuardrailWordPolicy>) -> Self
The word policy that was configured for the guardrail.
Sourcepub fn get_word_policy(&self) -> &Option<GuardrailWordPolicy>
pub fn get_word_policy(&self) -> &Option<GuardrailWordPolicy>
The word policy that was configured for the guardrail.
Sourcepub fn sensitive_information_policy(
self,
input: GuardrailSensitiveInformationPolicy,
) -> Self
pub fn sensitive_information_policy( self, input: GuardrailSensitiveInformationPolicy, ) -> Self
The sensitive information policy that was configured for the guardrail.
Sourcepub fn set_sensitive_information_policy(
self,
input: Option<GuardrailSensitiveInformationPolicy>,
) -> Self
pub fn set_sensitive_information_policy( self, input: Option<GuardrailSensitiveInformationPolicy>, ) -> Self
The sensitive information policy that was configured for the guardrail.
Sourcepub fn get_sensitive_information_policy(
&self,
) -> &Option<GuardrailSensitiveInformationPolicy>
pub fn get_sensitive_information_policy( &self, ) -> &Option<GuardrailSensitiveInformationPolicy>
The sensitive information policy that was configured for the guardrail.
Sourcepub fn contextual_grounding_policy(
self,
input: GuardrailContextualGroundingPolicy,
) -> Self
pub fn contextual_grounding_policy( self, input: GuardrailContextualGroundingPolicy, ) -> Self
The contextual grounding policy used in the guardrail.
Sourcepub fn set_contextual_grounding_policy(
self,
input: Option<GuardrailContextualGroundingPolicy>,
) -> Self
pub fn set_contextual_grounding_policy( self, input: Option<GuardrailContextualGroundingPolicy>, ) -> Self
The contextual grounding policy used in the guardrail.
Sourcepub fn get_contextual_grounding_policy(
&self,
) -> &Option<GuardrailContextualGroundingPolicy>
pub fn get_contextual_grounding_policy( &self, ) -> &Option<GuardrailContextualGroundingPolicy>
The contextual grounding policy used in the guardrail.
Sourcepub fn automated_reasoning_policy(
self,
input: GuardrailAutomatedReasoningPolicy,
) -> Self
pub fn automated_reasoning_policy( self, input: GuardrailAutomatedReasoningPolicy, ) -> Self
The current Automated Reasoning policy configuration for the guardrail, if any is configured.
Sourcepub fn set_automated_reasoning_policy(
self,
input: Option<GuardrailAutomatedReasoningPolicy>,
) -> Self
pub fn set_automated_reasoning_policy( self, input: Option<GuardrailAutomatedReasoningPolicy>, ) -> Self
The current Automated Reasoning policy configuration for the guardrail, if any is configured.
Sourcepub fn get_automated_reasoning_policy(
&self,
) -> &Option<GuardrailAutomatedReasoningPolicy>
pub fn get_automated_reasoning_policy( &self, ) -> &Option<GuardrailAutomatedReasoningPolicy>
The current Automated Reasoning policy configuration for the guardrail, if any is configured.
Sourcepub fn cross_region_details(self, input: GuardrailCrossRegionDetails) -> Self
pub fn cross_region_details(self, input: GuardrailCrossRegionDetails) -> Self
Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN).
Sourcepub fn set_cross_region_details(
self,
input: Option<GuardrailCrossRegionDetails>,
) -> Self
pub fn set_cross_region_details( self, input: Option<GuardrailCrossRegionDetails>, ) -> Self
Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN).
Sourcepub fn get_cross_region_details(&self) -> &Option<GuardrailCrossRegionDetails>
pub fn get_cross_region_details(&self) -> &Option<GuardrailCrossRegionDetails>
Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN).
Sourcepub fn created_at(self, input: DateTime) -> Self
pub fn created_at(self, input: DateTime) -> Self
The date and time at which the guardrail was created.
This field is required.Sourcepub fn set_created_at(self, input: Option<DateTime>) -> Self
pub fn set_created_at(self, input: Option<DateTime>) -> Self
The date and time at which the guardrail was created.
Sourcepub fn get_created_at(&self) -> &Option<DateTime>
pub fn get_created_at(&self) -> &Option<DateTime>
The date and time at which the guardrail was created.
Sourcepub fn updated_at(self, input: DateTime) -> Self
pub fn updated_at(self, input: DateTime) -> Self
The date and time at which the guardrail was updated.
This field is required.Sourcepub fn set_updated_at(self, input: Option<DateTime>) -> Self
pub fn set_updated_at(self, input: Option<DateTime>) -> Self
The date and time at which the guardrail was updated.
Sourcepub fn get_updated_at(&self) -> &Option<DateTime>
pub fn get_updated_at(&self) -> &Option<DateTime>
The date and time at which the guardrail was updated.
Sourcepub fn status_reasons(self, input: impl Into<String>) -> Self
pub fn status_reasons(self, input: impl Into<String>) -> Self
Appends an item to status_reasons.
To override the contents of this collection use set_status_reasons.
Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
Sourcepub fn set_status_reasons(self, input: Option<Vec<String>>) -> Self
pub fn set_status_reasons(self, input: Option<Vec<String>>) -> Self
Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
Sourcepub fn get_status_reasons(&self) -> &Option<Vec<String>>
pub fn get_status_reasons(&self) -> &Option<Vec<String>>
Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
Sourcepub fn failure_recommendations(self, input: impl Into<String>) -> Self
pub fn failure_recommendations(self, input: impl Into<String>) -> Self
Appends an item to failure_recommendations.
To override the contents of this collection use set_failure_recommendations.
Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.
Sourcepub fn set_failure_recommendations(self, input: Option<Vec<String>>) -> Self
pub fn set_failure_recommendations(self, input: Option<Vec<String>>) -> Self
Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.
Sourcepub fn get_failure_recommendations(&self) -> &Option<Vec<String>>
pub fn get_failure_recommendations(&self) -> &Option<Vec<String>>
Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.
Sourcepub fn blocked_input_messaging(self, input: impl Into<String>) -> Self
pub fn blocked_input_messaging(self, input: impl Into<String>) -> Self
The message that the guardrail returns when it blocks a prompt.
This field is required.Sourcepub fn set_blocked_input_messaging(self, input: Option<String>) -> Self
pub fn set_blocked_input_messaging(self, input: Option<String>) -> Self
The message that the guardrail returns when it blocks a prompt.
Sourcepub fn get_blocked_input_messaging(&self) -> &Option<String>
pub fn get_blocked_input_messaging(&self) -> &Option<String>
The message that the guardrail returns when it blocks a prompt.
Sourcepub fn blocked_outputs_messaging(self, input: impl Into<String>) -> Self
pub fn blocked_outputs_messaging(self, input: impl Into<String>) -> Self
The message that the guardrail returns when it blocks a model response.
This field is required.Sourcepub fn set_blocked_outputs_messaging(self, input: Option<String>) -> Self
pub fn set_blocked_outputs_messaging(self, input: Option<String>) -> Self
The message that the guardrail returns when it blocks a model response.
Sourcepub fn get_blocked_outputs_messaging(&self) -> &Option<String>
pub fn get_blocked_outputs_messaging(&self) -> &Option<String>
The message that the guardrail returns when it blocks a model response.
Sourcepub fn kms_key_arn(self, input: impl Into<String>) -> Self
pub fn kms_key_arn(self, input: impl Into<String>) -> Self
The ARN of the KMS key that encrypts the guardrail.
Sourcepub fn set_kms_key_arn(self, input: Option<String>) -> Self
pub fn set_kms_key_arn(self, input: Option<String>) -> Self
The ARN of the KMS key that encrypts the guardrail.
Sourcepub fn get_kms_key_arn(&self) -> &Option<String>
pub fn get_kms_key_arn(&self) -> &Option<String>
The ARN of the KMS key that encrypts the guardrail.
Sourcepub fn build(self) -> Result<GetGuardrailOutput, BuildError>
pub fn build(self) -> Result<GetGuardrailOutput, BuildError>
Consumes the builder and constructs a GetGuardrailOutput.
This method will fail if any of the following fields are not set:
Trait Implementations§
Source§impl Clone for GetGuardrailOutputBuilder
impl Clone for GetGuardrailOutputBuilder
Source§fn clone(&self) -> GetGuardrailOutputBuilder
fn clone(&self) -> GetGuardrailOutputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GetGuardrailOutputBuilder
impl Debug for GetGuardrailOutputBuilder
Source§impl Default for GetGuardrailOutputBuilder
impl Default for GetGuardrailOutputBuilder
Source§fn default() -> GetGuardrailOutputBuilder
fn default() -> GetGuardrailOutputBuilder
impl StructuralPartialEq for GetGuardrailOutputBuilder
Auto Trait Implementations§
impl Freeze for GetGuardrailOutputBuilder
impl RefUnwindSafe for GetGuardrailOutputBuilder
impl Send for GetGuardrailOutputBuilder
impl Sync for GetGuardrailOutputBuilder
impl Unpin for GetGuardrailOutputBuilder
impl UnwindSafe for GetGuardrailOutputBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);