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;

import java.util.ArrayList;
import java.util.List;

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

    @JsonProperty("RS_DATA")
    @Builder.Default
    private List<RsData> rsData = new ArrayList<>();

    @JsonProperty("fault")
    private Fault fault;

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

        @JsonProperty("BIRTH_NUMBER")
        private String birthNumber;

        @JsonProperty("CLIENT_CIF")
        private String clientCif;

        @JsonProperty("CONTEXT_CIF")
        private String contextCif;

        @JsonProperty("CLIENT_TYPE")
        private String clientType;

        @JsonProperty("CONTEXT_ID")
        private Long contextId;

        @JsonProperty("CONTEXT_NAME")
        private String contextName;

        @JsonProperty("CONTEXT_ROLES")
        private String contextRoles;

        @JsonProperty("CONTEXT_ROLE_NAMES")
        private String contextRoleNames;

        @JsonProperty("CLIENT_ENTITY_ID")
        private String clientEntityId;

        @JsonProperty("ENTITY_ID")
        private Long entityId;

        @JsonProperty("ENTITY_TYPE")
        private String entityType;

        @JsonProperty("FIRST_NAME")
        private String firstName;

        @JsonProperty("ICO_NUMBER")
        private String icoNumber;

        @JsonProperty("LAST_NAME")
        private String lastName;

        @JsonProperty("MASTER_FLAG")
        private String masterFlag;

        @JsonProperty("MIDDLE_NAME")
        private String middleName;

        @JsonProperty("STATUS")
        private String status;

        @JsonProperty("TITLE_AFTER")
        private String titleAfter;

        @JsonProperty("TITLE_BEFORE")
        private String titleBefore;

        @JsonProperty("ROW_ID")
        private Long rowId;

        @JsonProperty("USER_ID")
        private Long userId;

        @JsonProperty("LOGIN_NAME")
        private String loginName;
    }

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

        @JsonProperty("message")
        private String message;

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

