Package akka.javasdk.agent
Record Class MessageContent.PdfMessageContent
- Enclosing interface:
MessageContent
Factory methods for creating PDF message content.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aPdfMessageContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fromBytes(byte[] data) Creates inline PDF content from raw bytes, for returning a PDF from a@FunctionTool.Creates PDF content from a URI string.Creates PDF content from a URI.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI)instead.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PdfMessageContent
public PdfMessageContent()Creates an instance of aPdfMessageContentrecord class.
-
-
Method Details
-
fromUri
Creates PDF content from a URI string.- Parameters:
uri- The URI string pointing to the PDF. Supportshttp(s)://as well as custom schemes resolved by aContentLoaderandobject://bucket/keybacked by object storage.- Returns:
- A new PdfUrlMessageContent instance
-
fromUri
Creates PDF content from a URI.- Parameters:
uri- The URI pointing to the PDF- Returns:
- A new PdfUrlMessageContent instance
-
fromBytes
Creates inline PDF content from raw bytes, for returning a PDF from a@FunctionTool. Not valid as model input — reference PDFs by URI in aUserMessage.- Parameters:
data- the raw PDF bytes; must be effectively immutable — do not modify after passing it in
-
fromUrl
@Deprecated(forRemoval=true, since="3.6.0") public static MessageContent.PdfUrlMessageContent fromUrl(String url) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(String)instead. -
fromUrl
@Deprecated(forRemoval=true, since="3.6.0") public static MessageContent.PdfUrlMessageContent fromUrl(URL url) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI)instead. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
-
fromUri(String)instead.