Package com.sap.ai.sdk.orchestration
Record Class ImageItem
java.lang.Object
java.lang.Record
com.sap.ai.sdk.orchestration.ImageItem
- Record Components:
imageUrl- the URL of the imagedetailLevel- the detail level of the image (optional)
- All Implemented Interfaces:
ContentItem
public record ImageItem(@Nonnull String imageUrl, @Nonnull ImageItem.DetailLevel detailLevel)
extends Record
implements ContentItem
Represents an image item in a
MessageContent object.- Since:
- 1.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe detail level of the image. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new image item with the given image URL.ImageItem(String imageUrl, ImageItem.DetailLevel detailLevel) Creates an instance of aImageItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedetailLevelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.imageUrl()Returns the value of theimageUrlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImageItem
Creates a new image item with the given image URL.- Parameters:
imageUrl- the URL of the image- Since:
- 1.3.0
-
ImageItem
Creates an instance of aImageItemrecord class.- Parameters:
imageUrl- the value for theimageUrlrecord componentdetailLevel- the value for thedetailLevelrecord 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
-
detailLevel
Returns the value of thedetailLevelrecord component.- Returns:
- the value of the
detailLevelrecord component
-