Class DocumentContent

    • Method Detail

      • blob

        public final SdkBytes blob()

        The contents of the document. Documents passed to the blob parameter 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 blob parameter 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.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromBlob

        public static DocumentContent fromBlob​(SdkBytes blob)
        Create an instance of this class with blob() initialized to the given value.

        The contents of the document. Documents passed to the blob parameter 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 the blob parameter 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 with s3() 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 with s3() 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.