forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessageAttachment.java
More file actions
32 lines (28 loc) · 1.14 KB
/
MessageAttachment.java
File metadata and controls
32 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* Marker interface for all attachment types that can be included in a message.
* <p>
* This is the Java equivalent of the .NET SDK's
* {@code UserMessageDataAttachmentsItem} polymorphic base class.
*
* @see Attachment
* @see BlobAttachment
* @see MessageOptions#setAttachments(java.util.List)
* @since 1.2.0
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({@JsonSubTypes.Type(value = Attachment.class, name = "file"),
@JsonSubTypes.Type(value = BlobAttachment.class, name = "blob")})
public sealed interface MessageAttachment permits Attachment, BlobAttachment {
/**
* Returns the attachment type discriminator (e.g., "file", "blob").
*
* @return the type string
*/
String getType();
}