summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestVersionModel.cs
blob: 7cfb0cfcc9b202c3ce37b822ef828820fc64c151 (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
// Copyright 2022 Jamie Taylor
namespace StardewModdingAPI.Web.Framework.Clients.UpdateManifest.ResponseModels
{
    /// <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 mod page URL from which to download updates, if different from <see cref="UpdateManifestModModel.ModPageUrl"/>.</summary>
        public string? ModPageUrl { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="version">The mod's semantic version.</param>
        /// <param name="modPageUrl">The mod page URL from which to download updates, if different from <see cref="UpdateManifestModModel.ModPageUrl"/>.</param>
        public UpdateManifestVersionModel(string version, string? modPageUrl)
        {
            this.Version = version;
            this.ModPageUrl = modPageUrl;
        }
    }
}