[LIB-13] Package restructuring
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / json / chessbomb / JSONGame.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.chessbomb;
18
19 import java.util.Date;
20
21 import com.google.gson.annotations.SerializedName;
22
23 import org.hedgecode.chess.scanner.format.chessbomb.Game;
24 import org.hedgecode.chess.scanner.format.chessbomb.Player;
25
26 /**
27  * JSONGame
28  *
29  * @author Dmitry Samoshin aka gotty
30  */
31 public class JSONGame implements Game {
32
33     @SerializedName("id")
34     private int id;
35
36     @SerializedName("roomId")
37     private int roomId;
38
39     @SerializedName("slug")
40     private String slug;
41
42     @SerializedName("roundSlug")
43     private String roundSlug;
44
45     @SerializedName("whiteId")
46     private int whiteId;
47
48     @SerializedName("blackId")
49     private int blackId;
50
51     @SerializedName("whiteElo")
52     private int whiteElo;
53
54     @SerializedName("blackElo")
55     private int blackElo;
56
57     @SerializedName("startAt")
58     private Date startAt;
59
60     @SerializedName("endAt")
61     private Date endAt;
62
63     @SerializedName("updateAt")
64     private Date updateAt;
65
66     @SerializedName("result")
67     private String result;
68
69     @SerializedName("table")
70     private int table;
71
72     @SerializedName("board")
73     private int board;
74
75     @SerializedName("white")
76     private JSONPlayer white;
77
78     @SerializedName("black")
79     private JSONPlayer black;
80
81     JSONGame() {
82     }
83
84     @Override
85     public int id() {
86         return id;
87     }
88
89     @Override
90     public int roomId() {
91         return roomId;
92     }
93
94     @Override
95     public String slug() {
96         return slug;
97     }
98
99     @Override
100     public String roundSlug() {
101         return roundSlug;
102     }
103
104     @Override
105     public int whiteId() {
106         return whiteId;
107     }
108
109     @Override
110     public int blackId() {
111         return blackId;
112     }
113
114     @Override
115     public int whiteElo() {
116         return whiteElo;
117     }
118
119     @Override
120     public int blackElo() {
121         return blackElo;
122     }
123
124     @Override
125     public Date startAt() {
126         return startAt;
127     }
128
129     @Override
130     public Date endAt() {
131         return endAt;
132     }
133
134     @Override
135     public Date updateAt() {
136         return updateAt;
137     }
138
139     @Override
140     public String result() {
141         return result;
142     }
143
144     @Override
145     public int table() {
146         return table;
147     }
148
149     @Override
150     public int board() {
151         return board;
152     }
153
154     @Override
155     public Player white() {
156         return white;
157     }
158
159     @Override
160     public Player black() {
161         return black;
162     }
163
164 }