Class ExtensionContextAttachment
java.lang.Object
com.github.copilot.rpc.ExtensionContextAttachment
- All Implemented Interfaces:
MessageAttachment
Structured context contributed by an extension.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the provider-local canvas identifier.Gets the ISO 8601 capture timestamp.Gets the owning extension identifier.Gets the open canvas instance identifier.Gets the extension-defined structured payload.getTitle()Gets the human-readable context title.getType()Returns the attachment type, always"extension_context".setCanvasId(String canvasId) Sets the provider-local canvas identifier.setCapturedAt(String capturedAt) Sets the ISO 8601 capture timestamp.setExtensionId(String extensionId) Sets the owning extension identifier.setInstanceId(String instanceId) Sets the open canvas instance identifier.setPayload(Object payload) Sets the extension-defined structured payload.Sets the human-readable context title.
-
Constructor Details
-
ExtensionContextAttachment
public ExtensionContextAttachment()
-
-
Method Details
-
getType
Returns the attachment type, always"extension_context".- Specified by:
getTypein interfaceMessageAttachment- Returns:
"extension_context"
-
getCapturedAt
-
setCapturedAt
Sets the ISO 8601 capture timestamp.- Parameters:
capturedAt- the capture timestamp- Returns:
- this attachment for method chaining
-
getExtensionId
Gets the owning extension identifier.- Returns:
- the extension identifier
-
setExtensionId
Sets the owning extension identifier.- Parameters:
extensionId- the extension identifier- Returns:
- this attachment for method chaining
-
getTitle
-
setTitle
Sets the human-readable context title.- Parameters:
title- the context title- Returns:
- this attachment for method chaining
-
getCanvasId
Gets the provider-local canvas identifier.- Returns:
- the canvas identifier, or
null
-
setCanvasId
Sets the provider-local canvas identifier.- Parameters:
canvasId- the canvas identifier- Returns:
- this attachment for method chaining
-
getInstanceId
Gets the open canvas instance identifier.- Returns:
- the instance identifier, or
null
-
setInstanceId
Sets the open canvas instance identifier.- Parameters:
instanceId- the instance identifier- Returns:
- this attachment for method chaining
-
getPayload
Gets the extension-defined structured payload.- Returns:
- the structured payload, or
null
-
setPayload
Sets the extension-defined structured payload.- Parameters:
payload- a JSON-serializable payload- Returns:
- this attachment for method chaining
-