// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuDateDeserializer.java
// public class OsuDateDeserializer extends JsonDeserializer<Date> {
// 
//     @Override
//     public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
//         String value = jsonParser.getValueAsString();
// 
//         return value != null ? DateUtils.parseDate(value) : null;
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuDateSerializer.java
// public class OsuDateSerializer extends JsonSerializer<Date> {
// 
//     @Override
//     public void serialize(Date value, JsonGenerator generator, SerializerProvider provider) throws IOException {
//         if (value != null)
//             generator.writeString(DateUtils.formatDate(value));
//         else
//             generator.writeNull();
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuModDeserializer.java
// public class OsuModDeserializer extends JsonDeserializer<Set<Mod>> {
// 
//     @Override
//     public Set<Mod> deserialize(JsonParser parser, DeserializationContext context) throws IOException {
//         return Mod.parseFlagSum(Integer.parseInt(parser.getText()));
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuModSerializer.java
// public class OsuModSerializer extends JsonSerializer<Set<Mod>> {
// 
//     @Override
//     public void serialize(Set<Mod> value, JsonGenerator generator, SerializerProvider provider) throws IOException {
//         generator.writeString(String.valueOf(Mod.createSum(value)));
//     }
// }


import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import de.maxikg.osuapi.jackson.OsuDateDeserializer;
import de.maxikg.osuapi.jackson.OsuDateSerializer;
import de.maxikg.osuapi.jackson.OsuModDeserializer;
import de.maxikg.osuapi.jackson.OsuModSerializer;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Set;
package de.maxikg.osuapi.model;



/**
 * @author maxikg
 */
@Data
public class MatchGame {

    @JsonProperty("game_id")
    private int gameId;

    @JsonProperty("start_time")
    @JsonSerialize(using = OsuDateSerializer.class)
    @JsonDeserialize(using = OsuDateDeserializer.class)
    private Date startTime;

    @JsonProperty("end_time")
    @JsonSerialize(using = OsuDateSerializer.class)
    @JsonDeserialize(using = OsuDateDeserializer.class)
    private Date endTime;

    @JsonProperty("beatmap_id")
    private int beatmapId;

    @JsonProperty("play_mode")
    private GameMode playMode;

    @JsonProperty("match_type")
    private int matchType;

    @JsonProperty("scoring_type")
    private WinningCondition scoringType;

// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuDateDeserializer.java
// public class OsuDateDeserializer extends JsonDeserializer<Date> {
// 
//     @Override
//     public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
//         String value = jsonParser.getValueAsString();
// 
//         return value != null ? DateUtils.parseDate(value) : null;
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuDateSerializer.java
// public class OsuDateSerializer extends JsonSerializer<Date> {
// 
//     @Override
//     public void serialize(Date value, JsonGenerator generator, SerializerProvider provider) throws IOException {
//         if (value != null)
//             generator.writeString(DateUtils.formatDate(value));
//         else
//             generator.writeNull();
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuModDeserializer.java
// public class OsuModDeserializer extends JsonDeserializer<Set<Mod>> {
// 
//     @Override
//     public Set<Mod> deserialize(JsonParser parser, DeserializationContext context) throws IOException {
//         return Mod.parseFlagSum(Integer.parseInt(parser.getText()));
//     }
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/jackson/OsuModSerializer.java
// public class OsuModSerializer extends JsonSerializer<Set<Mod>> {
// 
//     @Override
//     public void serialize(Set<Mod> value, JsonGenerator generator, SerializerProvider provider) throws IOException {
//         generator.writeString(String.valueOf(Mod.createSum(value)));
//     }
// }


// Path: Common/src/main/java/de/maxikg/osuapi/model/MatchGame.java
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import de.maxikg.osuapi.jackson.OsuDateDeserializer;
import de.maxikg.osuapi.jackson.OsuDateSerializer;
import de.maxikg.osuapi.jackson.OsuModDeserializer;
import de.maxikg.osuapi.jackson.OsuModSerializer;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Set;

package de.maxikg.osuapi.model;



/**
 * @author maxikg
 */
@Data
public class MatchGame {

    @JsonProperty("game_id")
    private int gameId;

    @JsonProperty("start_time")
    @JsonSerialize(using = OsuDateSerializer.class)
    @JsonDeserialize(using = OsuDateDeserializer.class)
    private Date startTime;

    @JsonProperty("end_time")
    @JsonSerialize(using = OsuDateSerializer.class)
    @JsonDeserialize(using = OsuDateDeserializer.class)
    private Date endTime;

    @JsonProperty("beatmap_id")
    private int beatmapId;

    @JsonProperty("play_mode")
    private GameMode playMode;

    @JsonProperty("match_type")
    private int matchType;

    @JsonProperty("scoring_type")
    private WinningCondition scoringType;

    @JsonProperty("team_type")