[LIB-13] Lichess format entities for JSON parsing
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / json / lichess / JSONClock.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.lichess;
18
19 import com.google.gson.annotations.SerializedName;
20
21 import org.hedgecode.chess.scanner.format.lichess.Clock;
22
23 /**
24  * JSONClock
25  *
26  * @author Dmitry Samoshin aka gotty
27  */
28 public class JSONClock implements Clock {
29
30     @SerializedName("running")
31     private boolean running;
32
33     @SerializedName("initial")
34     private int initial;
35
36     @SerializedName("increment")
37     private int increment;
38
39     @SerializedName("white")
40     private float white;
41
42     @SerializedName("black")
43     private float black;
44
45     @SerializedName("emerg")
46     private int emerg;
47
48     @SerializedName("moretime")
49     private int moretime;
50
51     JSONClock() {
52     }
53
54     @Override
55     public boolean running() {
56         return running;
57     }
58
59     @Override
60     public int initial() {
61         return initial;
62     }
63
64     @Override
65     public int increment() {
66         return increment;
67     }
68
69     @Override
70     public float white() {
71         return white;
72     }
73
74     @Override
75     public float black() {
76         return black;
77     }
78
79     @Override
80     public int emerg() {
81         return emerg;
82     }
83
84     @Override
85     public int moretime() {
86         return moretime;
87     }
88
89 }