Package io.quarkiverse.mcp.server
Record Class EmbeddedResource
java.lang.Object
java.lang.Record
io.quarkiverse.mcp.server.EmbeddedResource
- Record Components:
resource- (must not benull)_meta- the optional metadata (may benull)annotations- the optional annotations (may benull)
- All Implemented Interfaces:
Content
public record EmbeddedResource(ResourceContents resource, Map<MetaKey,Object> _meta, Content.Annotations annotations)
extends Record
implements Content
A resource embedded into a prompt or tool call result.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkiverse.mcp.server.Content
Content.Annotations, Content.Type -
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedResource(ResourceContents resource) EmbeddedResource(ResourceContents resource, Map<MetaKey, Object> _meta, Content.Annotations annotations) Creates an instance of aEmbeddedResourcerecord class. -
Method Summary
Modifier and TypeMethodDescription_meta()Returns the value of the_metarecord component.Returns the value of theannotationsrecord component.Casts and returns this object as an embedded resource content, or throws anIllegalArgumentExceptionif the content object does not represent aEmbeddedResource.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.resource()Returns the value of theresourcerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
EmbeddedResource
-
EmbeddedResource
public EmbeddedResource(ResourceContents resource, Map<MetaKey, Object> _meta, Content.Annotations annotations) Creates an instance of aEmbeddedResourcerecord class.- Parameters:
resource- the value for theresourcerecord component_meta- the value for the_metarecord componentannotations- the value for theannotationsrecord component
-
-
Method Details
-
type
-
asResource
Description copied from interface:ContentCasts and returns this object as an embedded resource content, or throws anIllegalArgumentExceptionif the content object does not represent aEmbeddedResource.- Specified by:
asResourcein interfaceContent- Returns:
- the resource
-
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). -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
_meta
Returns the value of the_metarecord component. -
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceContent- Returns:
- the value of the
annotationsrecord component
-