[LIB-13] Tournament and game formats for JSON parsing
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / json / format / JSONRoom.java
1 /*
2  * Copyright (c) 2019-2020. Developed by Hedgecode.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.hedgecode.chess.scanner.json.format;
18
19 import java.util.Date;
20
21 import com.google.gson.annotations.SerializedName;
22
23 import org.hedgecode.chess.scanner.format.Room;
24
25 /**
26  * JSONRoom
27  *
28  * @author Dmitry Samoshin aka gotty
29  */
30 public class JSONRoom implements Room {
31
32     @SerializedName("id")
33     private int id;
34
35     @SerializedName("indexId")
36     private int indexId;
37
38     @SerializedName("slug")
39     private String slug;
40
41     @SerializedName("name")
42     private String name;
43
44     @SerializedName("shortName")
45     private String shortName;
46
47     @SerializedName("weight")
48     private int weight;
49
50     @SerializedName("startAt")
51     private Date startAt;
52
53     @SerializedName("endAt")
54     private Date endAt;
55
56     @SerializedName("updateAt")
57     private Date updateAt;
58
59     @SerializedName("eventType")
60     private String eventType;
61
62     @SerializedName("scoring")
63     private String scoring;
64
65     @SerializedName("officialUrl")
66     private String officialUrl;
67
68     JSONRoom() {
69     }
70
71     @Override
72     public int id() {
73         return id;
74     }
75
76     @Override
77     public int indexId() {
78         return indexId;
79     }
80
81     @Override
82     public String slug() {
83         return slug;
84     }
85
86     @Override
87     public String name() {
88         return name;
89     }
90
91     @Override
92     public String shortName() {
93         return shortName;
94     }
95
96     @Override
97     public int weight() {
98         return weight;
99     }
100
101     @Override
102     public Date startAt() {
103         return startAt;
104     }
105
106     @Override
107     public Date endAt() {
108         return endAt;
109     }
110
111     @Override
112     public Date updateAt() {
113         return updateAt;
114     }
115
116     @Override
117     public String eventType() {
118         return eventType;
119     }
120
121     @Override
122     public String scoring() {
123         return scoring;
124     }
125
126     @Override
127     public String officialUrl() {
128         return officialUrl;
129     }
130
131 }