Package io.agentscope.core.agui.model
Record Class InputContentUrlSource
java.lang.Object
java.lang.Record
io.agentscope.core.agui.model.InputContentUrlSource
- Record Components:
value- the URL pointing to the media contentmimeType- the optional MIME type hint, may be null
- All Implemented Interfaces:
InputContentSource
public record InputContentUrlSource(String value, String mimeType)
extends Record
implements InputContentSource
URL source in the AG-UI protocol.
JSON form: {"type": "url", "value": "https://...", "mimeType": "image/png"}
Maps to AgentScope's URLSource during conversion:
value → url, mimeType → mimeType.
- Since:
- 2026-08-01
- Author:
- shanhongyu
-
Constructor Summary
ConstructorsConstructorDescriptionInputContentUrlSource(String value) Convenience constructor without MIME type.InputContentUrlSource(String value, String mimeType) Compact constructor ensuringvalueis non-null. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
InputContentUrlSource
Compact constructor ensuringvalueis non-null.- Parameters:
value- the URLmimeType- the optional MIME type
-
InputContentUrlSource
Convenience constructor without MIME type.- Parameters:
value- the URL
-
-
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-