package com.xhpc.evcs.dto;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;

@Getter
@Setter
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        setterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE)
@JsonPropertyOrder({
        "FailReason",
        "OperatorID",
        "SuccStat",
        "AccessToken",
        "TokenAvailableTime"
})
public class TokenResponse {

    @JsonProperty("FailReason")
    Integer failReason;
    @JsonProperty("OperatorID")
    String operatorId;
    @JsonProperty("SuccStat")
    Integer succStat;
    @JsonProperty("AccessToken")
    String accessToken;
    @JsonProperty("TokenAvailableTime")
    Integer tokenAvailableTime;

    @Override
    public String toString() {

        return new ToStringBuilder(this).append("failReason", failReason).append("operatorID", operatorId).append("succStat",
                succStat).append("accessToken", accessToken).append("tokenAvailableTime", tokenAvailableTime).toString();
    }

}
