Class GetGuardrailResponse
- java.lang.Object
-
- software.amazon.awssdk.core.SdkResponse
-
- software.amazon.awssdk.awscore.AwsResponse
-
- software.amazon.awssdk.services.bedrock.model.BedrockResponse
-
- software.amazon.awssdk.services.bedrock.model.GetGuardrailResponse
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<GetGuardrailResponse.Builder,GetGuardrailResponse>
@Generated("software.amazon.awssdk:codegen") public final class GetGuardrailResponse extends BedrockResponse implements ToCopyableBuilder<GetGuardrailResponse.Builder,GetGuardrailResponse>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGetGuardrailResponse.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringblockedInputMessaging()The message that the guardrail returns when it blocks a prompt.StringblockedOutputsMessaging()The message that the guardrail returns when it blocks a model response.static GetGuardrailResponse.Builderbuilder()GuardrailContentPolicycontentPolicy()The content policy that was configured for the guardrail.GuardrailContextualGroundingPolicycontextualGroundingPolicy()The contextual grounding policy used in the guardrail.InstantcreatedAt()The date and time at which the guardrail was created.Stringdescription()The description of the guardrail.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)List<String>failureRecommendations()Appears if thestatusof the guardrail isFAILED.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)StringguardrailArn()The ARN of the guardrail.StringguardrailId()The unique identifier of the guardrail.booleanhasFailureRecommendations()For responses, this returns true if the service returned a value for the FailureRecommendations property.inthashCode()booleanhasStatusReasons()For responses, this returns true if the service returned a value for the StatusReasons property.StringkmsKeyArn()The ARN of the KMS key that encrypts the guardrail.Stringname()The name of the guardrail.List<SdkField<?>>sdkFields()GuardrailSensitiveInformationPolicysensitiveInformationPolicy()The sensitive information policy that was configured for the guardrail.static Class<? extends GetGuardrailResponse.Builder>serializableBuilderClass()GuardrailStatusstatus()The status of the guardrail.StringstatusAsString()The status of the guardrail.List<String>statusReasons()Appears if thestatusisFAILED.GetGuardrailResponse.BuildertoBuilder()GuardrailTopicPolicytopicPolicy()The topic policy that was configured for the guardrail.StringtoString()Returns a string representation of this object.InstantupdatedAt()The date and time at which the guardrail was updated.Stringversion()The version of the guardrail.GuardrailWordPolicywordPolicy()The word policy that was configured for the guardrail.-
Methods inherited from class software.amazon.awssdk.services.bedrock.model.BedrockResponse
responseMetadata
-
Methods inherited from class software.amazon.awssdk.core.SdkResponse
sdkHttpResponse
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
name
public final String name()
The name of the guardrail.
- Returns:
- The name of the guardrail.
-
description
public final String description()
The description of the guardrail.
- Returns:
- The description of the guardrail.
-
guardrailId
public final String guardrailId()
The unique identifier of the guardrail.
- Returns:
- The unique identifier of the guardrail.
-
guardrailArn
public final String guardrailArn()
The ARN of the guardrail.
- Returns:
- The ARN of the guardrail.
-
version
public final String version()
The version of the guardrail.
- Returns:
- The version of the guardrail.
-
status
public final GuardrailStatus status()
The status of the guardrail.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnGuardrailStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The status of the guardrail.
- See Also:
GuardrailStatus
-
statusAsString
public final String statusAsString()
The status of the guardrail.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnGuardrailStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The status of the guardrail.
- See Also:
GuardrailStatus
-
topicPolicy
public final GuardrailTopicPolicy topicPolicy()
The topic policy that was configured for the guardrail.
- Returns:
- The topic policy that was configured for the guardrail.
-
contentPolicy
public final GuardrailContentPolicy contentPolicy()
The content policy that was configured for the guardrail.
- Returns:
- The content policy that was configured for the guardrail.
-
wordPolicy
public final GuardrailWordPolicy wordPolicy()
The word policy that was configured for the guardrail.
- Returns:
- The word policy that was configured for the guardrail.
-
sensitiveInformationPolicy
public final GuardrailSensitiveInformationPolicy sensitiveInformationPolicy()
The sensitive information policy that was configured for the guardrail.
- Returns:
- The sensitive information policy that was configured for the guardrail.
-
contextualGroundingPolicy
public final GuardrailContextualGroundingPolicy contextualGroundingPolicy()
The contextual grounding policy used in the guardrail.
- Returns:
- The contextual grounding policy used in the guardrail.
-
createdAt
public final Instant createdAt()
The date and time at which the guardrail was created.
- Returns:
- The date and time at which the guardrail was created.
-
updatedAt
public final Instant updatedAt()
The date and time at which the guardrail was updated.
- Returns:
- The date and time at which the guardrail was updated.
-
hasStatusReasons
public final boolean hasStatusReasons()
For responses, this returns true if the service returned a value for the StatusReasons property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
statusReasons
public final List<String> statusReasons()
Appears if the
statusisFAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasStatusReasons()method.- Returns:
- Appears if the
statusisFAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
-
hasFailureRecommendations
public final boolean hasFailureRecommendations()
For responses, this returns true if the service returned a value for the FailureRecommendations property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
failureRecommendations
public final List<String> failureRecommendations()
Appears if the
statusof the guardrail isFAILED. A list of recommendations to carry out before retrying the request.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasFailureRecommendations()method.- Returns:
- Appears if the
statusof the guardrail isFAILED. A list of recommendations to carry out before retrying the request.
-
blockedInputMessaging
public final String blockedInputMessaging()
The message that the guardrail returns when it blocks a prompt.
- Returns:
- The message that the guardrail returns when it blocks a prompt.
-
blockedOutputsMessaging
public final String blockedOutputsMessaging()
The message that the guardrail returns when it blocks a model response.
- Returns:
- The message that the guardrail returns when it blocks a model response.
-
kmsKeyArn
public final String kmsKeyArn()
The ARN of the KMS key that encrypts the guardrail.
- Returns:
- The ARN of the KMS key that encrypts the guardrail.
-
toBuilder
public GetGuardrailResponse.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<GetGuardrailResponse.Builder,GetGuardrailResponse>- Specified by:
toBuilderin classAwsResponse
-
builder
public static GetGuardrailResponse.Builder builder()
-
serializableBuilderClass
public static Class<? extends GetGuardrailResponse.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsResponse
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsResponse
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkResponse
-
-