Class DocumentBlock
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockruntime.model.DocumentBlock
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<DocumentBlock.Builder,DocumentBlock>
@Generated("software.amazon.awssdk:codegen") public final class DocumentBlock extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DocumentBlock.Builder,DocumentBlock>
A document to include in a message.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDocumentBlock.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentBlock.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)DocumentFormatformat()The format of a document, or its extension.StringformatAsString()The format of a document, or its extension.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Stringname()A name for the document.List<SdkField<?>>sdkFields()static Class<? extends DocumentBlock.Builder>serializableBuilderClass()DocumentSourcesource()Contains the content of the document.DocumentBlock.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
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
-
format
public final DocumentFormat format()
The format of a document, or its extension.
If the service returns an enum value that is not available in the current SDK version,
formatwill returnDocumentFormat.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromformatAsString().- Returns:
- The format of a document, or its extension.
- See Also:
DocumentFormat
-
formatAsString
public final String formatAsString()
The format of a document, or its extension.
If the service returns an enum value that is not available in the current SDK version,
formatwill returnDocumentFormat.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromformatAsString().- Returns:
- The format of a document, or its extension.
- See Also:
DocumentFormat
-
name
public final String name()
A name for the document. The name can only contain the following characters:
-
Alphanumeric characters
-
Whitespace characters (no more than one in a row)
-
Hyphens
-
Parentheses
-
Square brackets
This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.
- Returns:
- A name for the document. The name can only contain the following characters:
-
Alphanumeric characters
-
Whitespace characters (no more than one in a row)
-
Hyphens
-
Parentheses
-
Square brackets
This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.
-
-
-
source
public final DocumentSource source()
Contains the content of the document.
- Returns:
- Contains the content of the document.
-
toBuilder
public DocumentBlock.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<DocumentBlock.Builder,DocumentBlock>
-
builder
public static DocumentBlock.Builder builder()
-
serializableBuilderClass
public static Class<? extends DocumentBlock.Builder> serializableBuilderClass()
-
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.
-
-