Package io.quarkiverse.mcp.server
Record Class EmbeddedResource
java.lang.Object
java.lang.Record
io.quarkiverse.mcp.server.EmbeddedResource
- Record Components:
- resource- (must not be- null)
- _meta- the optional metadata (may be- null)
- annotations- the optional annotations (may be- null)
- 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 SummaryNested classes/interfaces inherited from interface io.quarkiverse.mcp.server.ContentContent.Annotations, Content.Type
- 
Constructor SummaryConstructorsConstructorDescriptionEmbeddedResource(ResourceContents resource) EmbeddedResource(ResourceContents resource, Map<MetaKey, Object> _meta, Content.Annotations annotations) Creates an instance of aEmbeddedResourcerecord class.
- 
Method SummaryModifier 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
- 
EmbeddedResourcepublic EmbeddedResource(ResourceContents resource, Map<MetaKey, Object> _meta, Content.Annotations annotations) Creates an instance of aEmbeddedResourcerecord class.- Parameters:
- resource- the value for the- resourcerecord component
- _meta- the value for the- _metarecord component
- annotations- the value for the- annotationsrecord component
 
 
- 
- 
Method Details- 
type
- 
asResourceDescription 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 interface- Content
- Returns:
- the resource
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
resourceReturns the value of theresourcerecord component.- Returns:
- the value of the resourcerecord component
 
- 
_metaReturns the value of the_metarecord component.
- 
annotationsReturns the value of theannotationsrecord component.- Specified by:
- annotationsin interface- Content
- Returns:
- the value of the annotationsrecord component
 
 
-