package com.foreverwin.mesnac.integration.model;

import com.alibaba.fastjson.annotation.JSONField;

public class WebServiceDto {

    @JSONField(name="HANDLE")
    private String HANDLE;
    @JSONField(name="STATUS")
    private String STATUS;
    @JSONField(name="MESSAGE")
    private String MESSAGE;

    public static WebServiceDto success(String message) {
        WebServiceDto webServiceDto = new WebServiceDto();
        webServiceDto.setSTATUS("S");
        webServiceDto.setMESSAGE(message);

        return webServiceDto;
    }

    public static WebServiceDto success(String handle, String message) {
        WebServiceDto webServiceDto = new WebServiceDto();
        webServiceDto.setHANDLE(handle);
        webServiceDto.setSTATUS("S");
        webServiceDto.setMESSAGE(message);

        return webServiceDto;
    }

    public static WebServiceDto fail(String handle, String message) {
        WebServiceDto webServiceDto = new WebServiceDto();
        webServiceDto.setHANDLE(handle);
        webServiceDto.setSTATUS("E");
        webServiceDto.setMESSAGE(message);

        return webServiceDto;
    }

    public String getHANDLE() {
        return HANDLE;
    }

    public void setHANDLE(String HANDLE) {
        this.HANDLE = HANDLE;
    }

    public String getSTATUS() {
        return STATUS;
    }

    public void setSTATUS(String STATUS) {
        this.STATUS = STATUS;
    }

    public String getMESSAGE() {
        return MESSAGE;
    }

    public void setMESSAGE(String MESSAGE) {
        this.MESSAGE = MESSAGE;
    }
}
