package cz.moneta.test.dsl.wso2.objects.smallbusiness;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * Response model for MWFEW4 service
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class MWFEW4Response {

    @JsonProperty("tifResponseStatus")
    private ErrorModel tifResponseStatus;

    @JsonProperty("fault")
    private FaultModel fault;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ErrorModel {
        @JsonProperty("resultCode")
        private String resultCode;

        @JsonProperty("errorCode")
        private String errorCode;

        @JsonProperty("errorDesc")
        private String errorDesc;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class FaultModel {
        @JsonProperty("code")
        private String code;

        @JsonProperty("message")
        private String message;

        @JsonProperty("description")
        private String description;
    }
}

