dd4c1658abaecd474ad6e1a95688bd635a43c2f6
[rhynodge.git] / src / main / java / net / pterodactylus / rhynodge / filters / webpages / savoy / Performance.java
1 package net.pterodactylus.rhynodge.filters.webpages.savoy;
2
3 import com.fasterxml.jackson.annotation.JsonProperty;
4
5 import java.time.LocalDateTime;
6 import java.util.Objects;
7
8 /**
9  * Information about a performance and a link to buy a ticket.
10  */
11 public class Performance {
12
13         @JsonProperty
14         private final LocalDateTime time;
15
16         @JsonProperty
17         private final String type;
18
19         @JsonProperty
20         private final String link;
21
22         public Performance() {
23                 this(null, null, null);
24         }
25
26         public Performance(LocalDateTime time, String type, String link) {
27                 this.time = time;
28                 this.type = type;
29                 this.link = link;
30         }
31
32         public LocalDateTime getTime() {
33                 return time;
34         }
35
36         public String getType() {
37                 return type;
38         }
39
40         public String getLink() {
41                 return link;
42         }
43
44         @Override
45         public int hashCode() {
46                 return Objects.hash(time, type, link);
47         }
48
49         @Override
50         public boolean equals(Object o) {
51                 if (this == o) return true;
52                 if (o == null || getClass() != o.getClass()) return false;
53                 Performance that = (Performance) o;
54                 return Objects.equals(time, that.time) && Objects.equals(type, that.type) && Objects.equals(link, that.link);
55         }
56
57 }