using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Converters;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.Json.Serialization;

namespace ClipTrimDotNet.Client
{
    public enum PlaybackType
    {
        playStop,
        playOverlap
    }
    public class ClipMetadata
    {
        [JsonProperty(PropertyName = "filename")]
        [JsonPropertyName("filename")]

        public string Filename { get; set; }


        [JsonProperty(PropertyName = "name")]
        [JsonPropertyName("name")]
        public string Name { get; set; }


        [JsonProperty(PropertyName = "volume")]
        [JsonPropertyName("volume")]
        public double Volume { get; set; } = 1.0;


        [JsonProperty(PropertyName = "startTime")]
        [JsonPropertyName("startTime")]
        public double StartTime { get; set; } = 0.0;


        [JsonProperty(PropertyName = "endTime")]
        [JsonPropertyName("endTime")]
        public double EndTime { get; set; } = 0.0;


        [JsonProperty(PropertyName = "playbackType")]
        [Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))]
        [System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
        [JsonPropertyName("playbackType")]
        public PlaybackType PlaybackType { get; set; } = PlaybackType.playStop;
    }
}
