public enum ContentType extends java.lang.Enum<ContentType>
枚举常量和说明 |
---|
custom |
eventNotification |
file |
image |
location |
prompt |
text |
unknown
对于ContentType为unknown的消息,使用的MessageContent类型为
PromptContent ,
并定义promptType为PromptContent.PromptType.unknown_msg_type |
video |
voice |
限定符和类型 | 方法和说明 |
---|---|
static ContentType |
get(int index) |
static ContentType |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static ContentType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ContentType text
public static final ContentType image
public static final ContentType voice
public static final ContentType location
public static final ContentType video
public static final ContentType eventNotification
public static final ContentType custom
public static final ContentType unknown
PromptContent
,
并定义promptType为PromptContent.PromptType.unknown_msg_type
public static final ContentType file
public static final ContentType prompt
public static ContentType[] values()
for (ContentType c : ContentType.values()) System.out.println(c);
public static ContentType valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public static ContentType get(int index)