summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestVersionModel.cs
blob: 90e054d819a818f892692ef724d28799803b9681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2022 Jamie Taylor
namespace StardewModdingAPI.Web.Framework.Clients.UpdateManifest
{
    /// <summary>Data model for a Version in an update manifest.</summary>
    internal class UpdateManifestVersionModel
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The mod's semantic version.</summary>
        public string? Version { get; }

        /// <summary>The URL for this version's download page (if any).</summary>
        public string? DownloadPageUrl { get; }

        /// <summary>The URL for this version's direct file download (if any).</summary>
        public string? DownloadFileUrl { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="version">The mod's semantic version.</param>
        /// <param name="downloadPageUrl">This version's download page URL, if any.</param>
        /// <param name="downloadFileUrl">This version's direct file download URL, if any.</param>
        public UpdateManifestVersionModel(string version, string? downloadPageUrl, string? downloadFileUrl)
        {
            this.Version = version;
            this.DownloadPageUrl = downloadPageUrl;
            this.DownloadFileUrl = downloadFileUrl;
        }
    }
}