using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Domain.IoTFerErEntity
{
///
/// 本次用户输入的内容被理解为某个应用时的应用信息,用于一个开发者多个应用服务地址只有一个的时候的应用区分
///
public class ApplicationInfo
{
///
/// 开发者在平台创建应用时,平台分配的ID
///
public string application_id { get; set; }
///
/// 开发者在平台创建应用时,填写的应用名称
///
public string application_name { get; set; }
///
/// 应用的版本号,保留字段,默认为:“10000”
///
public string application_version { get; set; }
}
public class Attributes
{
///
///
///
public string focus { get; set; }
///
/// 小智
///
public string bizname { get; set; }
///
///
///
public string type { get; set; }
}
///
/// 会话相关的数据,包含:本次会话的ID、用户历史输入内容、会话中保持的槽值等
///
public class Session
{
///
/// 是否为新会话:true 是 false 否
///
public bool is_new { get; set; }
///
/// 本次交互会话中的会话ID,由平台方负责保持,在一次会话结束前,此ID不会变化
///
public string session_id { get; set; }
///
/// 会话具体参数,依据每个应用的不同,参数也不相同,此字段中主要以之前的槽值为主。
///
public Attributes attributes { get; set; }
}
///
/// 用户相关的数据,包含:用户的ID、用户正对当前应用的一个基础设置
///
public class User
{
///
/// 用户在平台相对于开发者某个应用的ID,注:应用不同,用户的ID也会不同
///
public string user_id { get; set; }
///
/// 用户具体参数,依据每个应用的不同,参数也不相同,此字段中主要以用户针对当前应用的基础配置,如:默认手机号、默认地址等。
///
public Attributes attributes { get; set; }
}
///
/// 个性化语义识别出来的用户当前输入对应的语义结果(槽值),当status为INTENT时不为空。注:槽值的key以及取值,与开发者当前的应用文法是一一对应的
///
public class Slots
{
///
///
///
public string focus { get; set; }
///
/// 小智
///
public string bizname { get; set; }
///
///
///
public string operation_type { get; set; }
///
/// 客厅
///
public string room { get; set; }
///
/// 灯
///
public string category { get; set; }
}
public class Extend
{
///
///
///
public string NO_REC { get; set; }
}
///
/// 请求包体
///
public class Request
{
///
/// 版本号,格式:X.X, 目前默认为:1.0
///
public string versionid { get; set; }
///
/// 状态,LAUNCH、INTENT、END、NOTICE,详细描述见6.2
///
public string status { get; set; }
///
/// 交互流水号,唯一标识一次平台对开发者服务的调用
///
public string sequence { get; set; }
///
/// 平台发送请求到开发者服务的的时间,格式为:当前时间的毫秒值
///
public long timestamp { get; set; }
///
/// 本次用户输入的内容被理解为某个应用时的应用信息,用于一个开发者多个应用服务地址只有一个的时候的应用区分
///
public ApplicationInfo application_info { get; set; }
///
/// 会话相关的数据,包含:本次会话的ID、用户历史输入内容、会话中保持的槽值等
///
public Session session { get; set; }
///
/// 用户相关的数据,包含:用户的ID、用户正对当前应用的一个基础设置
///
public User user { get; set; }
///
/// 用户本次内容:让小智关闭客厅灯。
///
public string input_text { get; set; }
///
/// 个性化语义识别出来的用户当前输入对应的语义结果(槽值),当status为INTENT时不为空。注:槽值的key以及取值,与开发者当前的应用文法是一一对应的
///
public Slots slots { get; set; }
///
/// 会话结束原因,详见附录6.1,当status为END时不为空,其它情况为空。
///
public string ended_reason { get; set; }
///
/// 通知类型,用于开发者详见附录6.3,当status为NOTICE时不为空,其它情况为空。
///
public string notice_type { get; set; }
///
///
///
public Extend extend { get; set; }
}
///
/// 开发者需要设备播报的内容。注:设备会依据开发者给出的顺序播报
///
public class DirectiveItems
{
///
/// 类型:1.TTS 2.AUDIO
///
public string type { get; set; }
///
/// TS播报内容。AUDIO 的url连接,请使用http的播放地址,音频格式为mp3、ma4。例如:好的,已帮您关闭了客厅灯
///
public string content { get; set; }
}
///
/// 开发者需要设备播报的内容。注:设备会依据开发者给出的顺序播报
///
public class Directive
{
///
///
///
public List directive_items { get; set; }
}
///
/// 开发者需要平台推送到设备关联的手机APP展现的内容,其中连接内可包含文本图片
///
public class Card
{
///
/// 开发者需要平台推送到用户设备关联的手机APP上展现的标题内容。注:不能超过20个字
///
public string title { get; set; }
///
/// APP展现内容类型:1.纯文字,2.图片(暂未开放),3.外部连接
///
public string type { get; set; }
///
/// type为1时使用
///
public string text { get; set; }
///
/// type为3时使用
///
public string url { get; set; }
}
public class RichContent
{
///
/// 类型:1.文字,2.图片
///
public string type { get; set; }
///
/// 类型为1时:文字内容,类型为2时:图片连接,连接长度不可超过512个字符
///
public string content { get; set; }
}
///
/// 应答包体
///
public class Response
{
///
/// 版本号,回传平台端调用时传递的版本号, 目前默认为:1.0
///
public string versionid { get; set; }
///
/// 由开发者服务决定本次会话是否结束,如果标识为结束(true)平台会清除本次会话在平台保持的会话数据,如果标识为不结束(false)平台继续为用户保持当前会话数据。
///
public bool is_end { get; set; }
///
/// 交互流水号,回传平台调用时传递的值
///
public string sequence { get; set; }
///
/// 开发者服务应答平台的请求的时间,格式为:当前时间的毫秒值
///
public int timestamp { get; set; }
///
/// 需要的槽值:如不为空,飞尔云会主动为开发者收集此槽值服务,如用户输入的说法不符合槽值提取规则,则视为未识别重复收集。如为空则表明不需要平台关注槽值的识别,全部透传到第三方应用进行判断
///
public string need_slot { get; set; }
///
/// 开发者需要设备播报的内容。注:设备会依据开发者给出的顺序播报
///
public Directive directive { get; set; }
///
/// 开发者需要平台推送到设备关联的手机APP展现的内容,其中连接内可包含文本图片
///
public Card push_to_app { get; set; }
///
/// 当设备未能识别用户说话时,给用户的重新提示语,以引导用户进行后继的对话,其中可以包含文本播报和流媒体播报。如果该字段为空,且设备发生未识别用户说话时,则设备会重复播放directive字段的内容
///
public Directive repeat_directive { get; set; }
///
/// 扩展字段,目前支持的扩展内容是,上一次会话拒识时,要不要让设备响应用户的下一次拒识的输入, 如果NO_REC(需大写)取值0时,播报响应。取值1时,不播报。默认是0
///
public Extend extend { get; set; }
}
}