﻿using Newtonsoft.Json;

namespace QnAMaker.Model
{
    public class Knowledge
    {
        [JsonRequired]
        [JsonProperty(PropertyName = "question")]
        public readonly string Question;

        [JsonRequired]
        [JsonProperty(PropertyName = "answer")]
        public readonly string Answer;

        [JsonProperty(PropertyName = "source")]
        public readonly string Source;

        public Knowledge(string question, string answer)
        {
            Question = question;
            Answer = answer;
        }

        public Knowledge(string question, string answer, string source) : this(question, answer)
        {
            Source = source;
        }
    }
}
