BotSharp/BotSharp.Platform.Dialogflow/Models/DialogflowEntity.cs

43 lines
933 B
C#
Raw Normal View History

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace BotSharp.Platform.Dialogflow.Models
{
[JsonObject]
public class DialogflowEntity
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("entries")]
public List<DialogflowEntityEntry> Entries { get; set; }
public DialogflowEntity()
{
}
public DialogflowEntity(string name)
{
this.Name = name;
}
public DialogflowEntity(string name, List<DialogflowEntityEntry> entries)
{
this.Name = name;
this.Entries = entries;
}
public void AddEntry(DialogflowEntityEntry entry)
{
if (Entries == null)
{
Entries = new List<DialogflowEntityEntry>();
}
Entries.Add(entry);
}
}
}