summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/FileDataModel.cs
blob: 31905338819ec3af522c475a0464cb07675c79b5 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using Newtonsoft.Json;

namespace StardewModdingAPI.Web.Framework.Clients.ModDrop.ResponseModels
{
    /// <summary>Metadata from the ModDrop API about a mod file.</summary>
    public class FileDataModel
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The file title.</summary>
        [JsonProperty("title")]
        public string Name { get; }

        /// <summary>The file description.</summary>
        [JsonProperty("desc")]
        public string Description { get; }

        /// <summary>The file version.</summary>
        public string Version { get; }

        /// <summary>Whether the file is deleted.</summary>
        public bool IsDeleted { get; }

        /// <summary>Whether the file is hidden from users.</summary>
        public bool IsHidden { get; }

        /// <summary>Whether this is the default file for the mod.</summary>
        public bool IsDefault { get; }

        /// <summary>Whether this is an archived file.</summary>
        public bool IsOld { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="name">The file title.</param>
        /// <param name="description">The file description.</param>
        /// <param name="version">The file version.</param>
        /// <param name="isDeleted">Whether the file is deleted.</param>
        /// <param name="isHidden">Whether the file is hidden from users.</param>
        /// <param name="isDefault">Whether this is the default file for the mod.</param>
        /// <param name="isOld">Whether this is an archived file.</param>
        public FileDataModel(string name, string description, string version, bool isDeleted, bool isHidden, bool isDefault, bool isOld)
        {
            this.Name = name;
            this.Description = description;
            this.Version = version;
            this.IsDeleted = isDeleted;
            this.IsHidden = isHidden;
            this.IsDefault = isDefault;
            this.IsOld = isOld;
        }
    }
}