Package io.meeds.mcp.server.tool.util
Record Class UploadToolUtils.ImageSource
java.lang.Object
java.lang.Record
io.meeds.mcp.server.tool.util.UploadToolUtils.ImageSource
- Enclosing class:
UploadToolUtils
public static record UploadToolUtils.ImageSource(String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId)
extends Record
The three mutually-exclusive ways to provide an image to
UploadToolUtils.resolveImage(org.exoplatform.social.attachment.AttachmentService, org.exoplatform.commons.file.services.FileService, org.exoplatform.services.security.Identity, io.meeds.mcp.server.tool.util.UploadToolUtils.ImageSource, long): a public
http(s) URL, base64-encoded bytes, or a reference to an existing platform attachment
(attachmentObjectType + attachmentObjectId).-
Constructor Summary
ConstructorsConstructorDescriptionImageSource(String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) Creates an instance of aImageSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentObjectIdrecord component.Returns the value of theattachmentObjectTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theimageBase64record component.imageUrl()Returns the value of theimageUrlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImageSource
public ImageSource(String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) Creates an instance of aImageSourcerecord class.- Parameters:
imageUrl- the value for theimageUrlrecord componentimageBase64- the value for theimageBase64record componentattachmentObjectType- the value for theattachmentObjectTyperecord componentattachmentObjectId- the value for theattachmentObjectIdrecord component
-
-
Method Details
-
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). -
imageUrl
Returns the value of theimageUrlrecord component.- Returns:
- the value of the
imageUrlrecord component
-
imageBase64
Returns the value of theimageBase64record component.- Returns:
- the value of the
imageBase64record component
-
attachmentObjectType
Returns the value of theattachmentObjectTyperecord component.- Returns:
- the value of the
attachmentObjectTyperecord component
-
attachmentObjectId
Returns the value of theattachmentObjectIdrecord component.- Returns:
- the value of the
attachmentObjectIdrecord component
-