class SDNCLcmPayloadBuilder {

    public static DownloadNESwPayload buildDownloadNESwPayload(DelegateExecution execution) {
        String requestPayload = String.valueOf(execution.getVariable(REQUEST_PAYLOAD));

        DownloadNESwPayload downloadNESwPayload = new DownloadNESwPayload();

        String ipaddressV4Oam = JsonUtils.getJsonValue(requestPayload, "ipaddressV4Oam");
        downloadNESwPayload.setIpaddressV4Oam(ipaddressV4Oam);

        String swToBeDownloadedString = JsonUtils.getJsonValue(requestPayload, "swToBeDownloaded");
        SwToBeDownloadedElement[] swToBeDownloadedArray;

        ObjectMapper mapper = new ObjectMapper();
        try {
            swToBeDownloadedArray = mapper.readValue(swToBeDownloadedString, SwToBeDownloadedElement[].class);
            downloadNESwPayload.setSwToBeDownloaded(Arrays.asList(swToBeDownloadedArray));
        } catch (Exception e) {
            logger.error("Parse SwToBeDownloaded error: ", e);
        }

        String playbookName = JsonUtils.getJsonValue(requestPayload, "downloadNESwPlaybook");
        if (playbookName != null) {
            downloadNESwPayload.setPlaybookName(playbookName);
        }

        return downloadNESwPayload;
    }

}