Package akka.javasdk.agent
Record Class MessageContent.PdfUrlMessageContent
- Record Components:
uri- The URI pointing to the PDF
- All Implemented Interfaces:
MessageContent,MessageContent.LoadableMessageContent
- Enclosing interface:
MessageContent
public static record MessageContent.PdfUrlMessageContent(URI uri)
extends Record
implements MessageContent.LoadableMessageContent
PDF content within a user message, referenced by URI.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.MessageContent
MessageContent.DataMessageContent, MessageContent.ImageBytesMessageContent, MessageContent.ImageDataMessageContent, MessageContent.ImageMessageContent, MessageContent.ImageUrlMessageContent, MessageContent.LoadableMessageContent, MessageContent.PdfBytesMessageContent, MessageContent.PdfDataMessageContent, MessageContent.PdfMessageContent, MessageContent.PdfUrlMessageContent, MessageContent.TextMessageContent -
Constructor Summary
ConstructorsConstructorDescriptionPdfUrlMessageContent(URI uri) Creates an instance of aPdfUrlMessageContentrecord class.PdfUrlMessageContent(URL url) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioncreate(ObjectStorage bucket, String key) Creates PDF content referencing an object in a bucket via theobject://URI scheme.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.url()Deprecated, for removal: This API element is subject to removal in a future version.Useuri()instead.
-
Constructor Details
-
PdfUrlMessageContent
Deprecated, for removal: This API element is subject to removal in a future version.UsePdfUrlMessageContent(URI)instead. -
PdfUrlMessageContent
Creates an instance of aPdfUrlMessageContentrecord class.- Parameters:
uri- the value for theurirecord component
-
-
Method Details
-
create
Creates PDF content referencing an object in a bucket via theobject://URI scheme.- Parameters:
bucket- the object-storage bucketkey- the object key within the bucket
-
url
Deprecated, for removal: This API element is subject to removal in a future version.Useuri()instead.Returns the URI as aURLfor backwards compatibility.- Throws:
RuntimeException- if the URI cannot be converted to a URL (e.g. forobject://URIs)
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
PdfUrlMessageContent(URI)instead.