BotSharp/Platform.Dialogflow/Models/AgentModel.cs

69 lines
1.6 KiB
C#
Raw Normal View History

2018-10-03 01:44:11 +00:00
using BotSharp.Core.Agents;
using BotSharp.Platform.Models;
using BotSharp.Platform.Models.Intents;
2018-10-02 19:49:37 +00:00
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
2018-10-03 01:44:11 +00:00
using System.ComponentModel.DataAnnotations;
2018-10-02 19:49:37 +00:00
using System.Text;
namespace Platform.Dialogflow.Models
{
public class AgentModel : AgentBase
{
public AgentModel()
{
2018-10-03 01:44:11 +00:00
CreatedDate = DateTime.UtcNow;
2018-10-02 19:49:37 +00:00
}
2018-10-03 01:44:11 +00:00
[Required]
[MaxLength(64)]
public String Name { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
[MaxLength(256)]
public String Description { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
public Boolean Published { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
[Required]
[MaxLength(5)]
public String Language { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
/// <summary>
/// Only access text/ audio rquest
/// </summary>
[StringLength(32)]
public String ClientAccessToken { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
/// <summary>
/// Developer can access more APIs
/// </summary>
[StringLength(32)]
public String DeveloperAccessToken { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
public List<Intent> Intents { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
[JsonProperty("entity_types")]
public List<EntityType> Entities { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
public String Birthday
{
get
{
return CreatedDate.ToShortDateString();
}
}
[Required]
public DateTime CreatedDate { get; set; }
public Boolean IsSkillSet { get; set; }
public AgentMlConfig MlConfig { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
public TrainingCorpus Corpus { get; set; }
2018-10-02 19:49:37 +00:00
2018-10-03 01:44:11 +00:00
public List<AgentIntegration> Integrations { get; set; }
2018-10-02 19:49:37 +00:00
}
}