Class DocumentContent
- java.lang.Object
-
- software.amazon.awssdk.services.qbusiness.model.DocumentContent
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<DocumentContent.Builder,DocumentContent>
@Generated("software.amazon.awssdk:codegen") public final class DocumentContent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DocumentContent.Builder,DocumentContent>
The contents of a document.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDocumentContent.Builderstatic classDocumentContent.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SdkBytesblob()The contents of the document.static DocumentContent.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static DocumentContentfromBlob(SdkBytes blob)Create an instance of this class withblob()initialized to the given value.static DocumentContentfromS3(Consumer<S3.Builder> s3)Create an instance of this class withs3()initialized to the given value.static DocumentContentfromS3(S3 s3)Create an instance of this class withs3()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()S3s3()The path to the document in an Amazon S3 bucket.List<SdkField<?>>sdkFields()static Class<? extends DocumentContent.Builder>serializableBuilderClass()DocumentContent.BuildertoBuilder()StringtoString()Returns a string representation of this object.DocumentContent.Typetype()Retrieve an enum value representing which member of this object is populated.-
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
-
blob
public final SdkBytes blob()
The contents of the document. Documents passed to the
blobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the Amazon Q endpoint directly using REST, you must base64 encode the contents before sending.- Returns:
- The contents of the document. Documents passed to the
blobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the Amazon Q endpoint directly using REST, you must base64 encode the contents before sending.
-
s3
public final S3 s3()
The path to the document in an Amazon S3 bucket.
- Returns:
- The path to the document in an Amazon S3 bucket.
-
toBuilder
public DocumentContent.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<DocumentContent.Builder,DocumentContent>
-
builder
public static DocumentContent.Builder builder()
-
serializableBuilderClass
public static Class<? extends DocumentContent.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.
-
fromBlob
public static DocumentContent fromBlob(SdkBytes blob)
Create an instance of this class withblob()initialized to the given value.The contents of the document. Documents passed to the
blobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the Amazon Q endpoint directly using REST, you must base64 encode the contents before sending.- Parameters:
blob- The contents of the document. Documents passed to theblobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the Amazon Q endpoint directly using REST, you must base64 encode the contents before sending.
-
fromS3
public static DocumentContent fromS3(S3 s3)
Create an instance of this class withs3()initialized to the given value.The path to the document in an Amazon S3 bucket.
- Parameters:
s3- The path to the document in an Amazon S3 bucket.
-
fromS3
public static DocumentContent fromS3(Consumer<S3.Builder> s3)
Create an instance of this class withs3()initialized to the given value.The path to the document in an Amazon S3 bucket.
- Parameters:
s3- The path to the document in an Amazon S3 bucket.
-
type
public DocumentContent.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beDocumentContent.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beDocumentContent.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-