Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit baa67a7

Browse files
author
Not Officer
committed
added NewsMotd
1 parent 0c91903 commit baa67a7

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
using System;
2+
3+
using J = Newtonsoft.Json.JsonPropertyAttribute;
4+
5+
namespace Fortnite_API.Objects
6+
{
7+
public class NewsMotd : IEquatable<NewsMotd>
8+
{
9+
[J("id")] public string Id { get; private set; }
10+
[J("title")] public string Title { get; private set; }
11+
[J("body")] public string Body { get; private set; }
12+
[J("image")] public Uri Image { get; private set; }
13+
[J("tileImage")] public Uri TileImage { get; private set; }
14+
[J("hidden")] public bool Hidden { get; private set; }
15+
[J("spotlight")] public bool Spotlight { get; private set; }
16+
[J("type")] public string Type { get; private set; }
17+
[J("entryType")] public string EntryType { get; private set; }
18+
19+
public bool Equals(NewsMotd other)
20+
{
21+
if (ReferenceEquals(null, other))
22+
{
23+
return false;
24+
}
25+
26+
if (ReferenceEquals(this, other))
27+
{
28+
return true;
29+
}
30+
31+
return Id == other.Id && Title == other.Title && Body == other.Body && Equals(Image, other.Image) && Equals(TileImage, other.TileImage) && Hidden == other.Hidden && Spotlight == other.Spotlight && Type == other.Type && EntryType == other.EntryType;
32+
}
33+
34+
public override bool Equals(object obj)
35+
{
36+
if (ReferenceEquals(null, obj))
37+
{
38+
return false;
39+
}
40+
41+
if (ReferenceEquals(this, obj))
42+
{
43+
return true;
44+
}
45+
46+
if (obj.GetType() != typeof(NewsMotd))
47+
{
48+
return false;
49+
}
50+
51+
return Equals((NewsMotd)obj);
52+
}
53+
54+
public override int GetHashCode()
55+
{
56+
var hashCode = new HashCode();
57+
hashCode.Add(Id);
58+
hashCode.Add(Title);
59+
hashCode.Add(Body);
60+
hashCode.Add(Image);
61+
hashCode.Add(TileImage);
62+
hashCode.Add(Hidden);
63+
hashCode.Add(Spotlight);
64+
hashCode.Add(Type);
65+
hashCode.Add(EntryType);
66+
return hashCode.ToHashCode();
67+
}
68+
69+
public static bool operator ==(NewsMotd left, NewsMotd right)
70+
{
71+
return Equals(left, right);
72+
}
73+
74+
public static bool operator !=(NewsMotd left, NewsMotd right)
75+
{
76+
return !Equals(left, right);
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)