package com.alterdekim.game.controller.result.async.old;

import com.alterdekim.game.controller.result.async.*;
import com.alterdekim.game.entity.*;
import com.alterdekim.game.xml.CryptoSerializer;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.*;

import java.util.List;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@JsonRootName(value = "response")
public class ServerActionResultOld {

    @JacksonXmlProperty(isAttribute = false, localName = "user_name")
    private UserName username;

    @JacksonXmlProperty(isAttribute = false, localName = "sn_status")
    private SnStatus snStatus;

    @JacksonXmlProperty
    private List<Preloader> preloader;

    @JacksonXmlProperty(localName = "magic_abilities")
    @JacksonXmlElementWrapper(useWrapping = true, localName = "magic_abilities")
    private List<MagicAbility> magicAbilities;

    @JacksonXmlProperty
    private Flags flags;

    @JacksonXmlProperty(localName = "tutorial")
    @JacksonXmlElementWrapper(useWrapping = true, localName = "tutorial")
    private List<Tutorial> tutorial;

    @JacksonXmlProperty
    private Grants grants;

    @JacksonXmlProperty
    private Grants requests;

    @JacksonXmlProperty
    private List<Promotion> promotion;

    @JacksonXmlProperty(localName = "promotion_banner")
    private List<PromotionBanner> promotionBanners;

    @JacksonXmlProperty
    private PhoneMessages phone;

    @JacksonXmlProperty
    private PostcardMessages postcard;

    @JacksonXmlProperty
    @JacksonXmlElementWrapper(useWrapping = true, localName = "miniquest")
    private List<Miniquest> miniquest;

    @JacksonXmlProperty(localName = "resources")
    private ResourcesResult resources;

    @JacksonXmlProperty(localName = "cdata")
    @JsonSerialize(using = CryptoSerializer.class)
    @JacksonXmlElementWrapper(useWrapping = false, localName = "cdata")
    private List<ServerActionCData> cdata;
}
