using System;
using System.Text.Json.Serialization;
namespace Jellyfin.Plugin.SRFPlay.Api.Models;
///
/// A scheduled or active recording.
///
public class RecordingEntry
{
///
/// Gets or sets the unique recording ID.
///
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
///
/// Gets or sets the SRF URN.
///
[JsonPropertyName("urn")]
public string Urn { get; set; } = string.Empty;
///
/// Gets or sets the title.
///
[JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
///
/// Gets or sets the description.
///
[JsonPropertyName("description")]
public string? Description { get; set; }
///
/// Gets or sets the image URL.
///
[JsonPropertyName("imageUrl")]
public string? ImageUrl { get; set; }
///
/// Gets or sets when the livestream starts.
///
[JsonPropertyName("validFrom")]
public DateTime? ValidFrom { get; set; }
///
/// Gets or sets when the livestream ends.
///
[JsonPropertyName("validTo")]
public DateTime? ValidTo { get; set; }
///
/// Gets or sets the recording state.
///
[JsonPropertyName("state")]
public RecordingState State { get; set; } = RecordingState.Scheduled;
///
/// Gets or sets the output file path.
///
[JsonPropertyName("outputPath")]
public string? OutputPath { get; set; }
///
/// Gets or sets when the recording actually started.
///
[JsonPropertyName("recordingStartedAt")]
public DateTime? RecordingStartedAt { get; set; }
///
/// Gets or sets when the recording ended.
///
[JsonPropertyName("recordingEndedAt")]
public DateTime? RecordingEndedAt { get; set; }
///
/// Gets or sets the file size in bytes.
///
[JsonPropertyName("fileSizeBytes")]
public long? FileSizeBytes { get; set; }
///
/// Gets or sets the error message if recording failed.
///
[JsonPropertyName("errorMessage")]
public string? ErrorMessage { get; set; }
///
/// Gets or sets when this entry was created.
///
[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}