using System;
using SharpAgent.Core.Server.Providers;

namespace SharpAgent.Core.Model
{
    public class UploadResult
    {
        public UploadResult()
        {
        }

        private UploadResult(UploadRequest request)
        {
            Request = request;
        }

        public UploadRequest Request { get; set; }

        public DateTime Created
        {
            get { return DateTimeProvider.Now(); }
        }

        public string Output { get; set; }

        public static UploadResult Ok(UploadRequest request)
        {
            return new UploadResult(request);
        }

        public override string ToString()
        {
            return string.Format("Created: {0}, Request: {1}, Output: {2}", Created, Request, Output);
        }
    }
}