#nullable enable
using System.Text.Json.Serialization;
using SysVersion = System.Version;
namespace MediaBrowser.Model.Updates
{
///
/// Defines the class.
///
public class VersionInfo
{
private SysVersion? _version;
///
/// Gets or sets the version.
///
/// The version.
[JsonPropertyName("version")]
public string Version
{
get => _version == null ? string.Empty : _version.ToString();
set => _version = SysVersion.Parse(value);
}
///
/// Gets the version as a .
///
public SysVersion VersionNumber => _version ?? new SysVersion(0, 0, 0);
///
/// Gets or sets the changelog for this version.
///
/// The changelog.
[JsonPropertyName("changelog")]
public string? Changelog { get; set; }
///
/// Gets or sets the ABI that this version was built against.
///
/// The target ABI version.
[JsonPropertyName("targetAbi")]
public string? TargetAbi { get; set; }
///
/// Gets or sets the source URL.
///
/// The source URL.
[JsonPropertyName("sourceUrl")]
public string? SourceUrl { get; set; }
///
/// Gets or sets a checksum for the binary.
///
/// The checksum.
[JsonPropertyName("checksum")]
public string? Checksum { get; set; }
///
/// Gets or sets a timestamp of when the binary was built.
///
/// The timestamp.
[JsonPropertyName("timestamp")]
public string? Timestamp { get; set; }
///
/// Gets or sets the repository name.
///
[JsonPropertyName("repositoryName")]
public string RepositoryName { get; set; } = string.Empty;
///
/// Gets or sets the repository url.
///
[JsonPropertyName("repositoryUrl")]
public string RepositoryUrl { get; set; } = string.Empty;
}
}