1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Diagnostics ;
4+
5+ using I = Newtonsoft . Json . JsonIgnoreAttribute ;
6+ using J = Newtonsoft . Json . JsonPropertyAttribute ;
7+
8+ namespace Fortnite_API . Objects . V1
9+ {
10+ [ DebuggerDisplay ( "{" + nameof ( Id ) + "}" ) ]
11+ public class PlaylistV1 : IEquatable < PlaylistV1 >
12+ {
13+ [ J ] public string Id { get ; private set ; }
14+ [ J ] public string Name { get ; private set ; }
15+ [ J ] public string SubName { get ; private set ; }
16+ [ J ] public string Description { get ; private set ; }
17+ [ J ] public string GameType { get ; private set ; }
18+ [ J ] public int MinPlayers { get ; private set ; }
19+ [ J ] public int MaxPlayers { get ; private set ; }
20+ [ J ] public int MaxTeams { get ; private set ; }
21+ [ J ] public int MaxTeamSize { get ; private set ; }
22+ [ J ] public int MaxSquads { get ; private set ; }
23+ [ J ] public int MaxSquadSize { get ; private set ; }
24+ [ J ] public bool IsDefault { get ; private set ; }
25+ [ J ] public bool IsTournament { get ; private set ; }
26+ [ J ] public bool IsLimitedTimeMode { get ; private set ; }
27+ [ J ] public bool IsLargeTeamGame { get ; private set ; }
28+ [ J ] public bool AccumulateToProfileStats { get ; private set ; }
29+ [ J ] public PlaylistV1Images Images { get ; private set ; }
30+ [ J ] public List < string > GameplayTags { get ; private set ; }
31+ [ J ] public string Path { get ; private set ; }
32+ [ J ] public DateTime Added { get ; private set ; }
33+
34+ [ I ] public bool HasGameplayTags => GameplayTags != null && GameplayTags . Count != 0 ;
35+
36+ public bool Equals ( PlaylistV1 other )
37+ {
38+ if ( ReferenceEquals ( null , other ) )
39+ {
40+ return false ;
41+ }
42+
43+ if ( ReferenceEquals ( this , other ) )
44+ {
45+ return true ;
46+ }
47+
48+ return Id == other . Id && Path == other . Path && Added . Equals ( other . Added ) ;
49+ }
50+
51+ public override bool Equals ( object obj )
52+ {
53+ if ( ReferenceEquals ( null , obj ) )
54+ {
55+ return false ;
56+ }
57+
58+ if ( ReferenceEquals ( this , obj ) )
59+ {
60+ return true ;
61+ }
62+
63+ if ( obj . GetType ( ) != GetType ( ) )
64+ {
65+ return false ;
66+ }
67+
68+ return Equals ( ( PlaylistV1 ) obj ) ;
69+ }
70+
71+ public override int GetHashCode ( )
72+ {
73+ unchecked
74+ {
75+ var hashCode = Id . GetHashCode ( ) ;
76+ hashCode = hashCode * 397 ^ Path . GetHashCode ( ) ;
77+ hashCode = hashCode * 397 ^ Added . GetHashCode ( ) ;
78+ return hashCode ;
79+ }
80+ }
81+
82+ public static bool operator == ( PlaylistV1 left , PlaylistV1 right )
83+ {
84+ return Equals ( left , right ) ;
85+ }
86+
87+ public static bool operator != ( PlaylistV1 left , PlaylistV1 right )
88+ {
89+ return ! Equals ( left , right ) ;
90+ }
91+ }
92+ }
0 commit comments