Files
Web_CRICS_Server_VS2010_Prod/Domain/IoTFeiErEntity.cs
2025-12-11 09:17:16 +08:00

265 lines
10 KiB
C#
Raw Blame History

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