class SDNCLcmPayloadBuilder {

    public static ActivateNESwPayload buildActivateNESwPayload(DelegateExecution execution) {
        String requestPayload = String.valueOf(execution.getVariable(REQUEST_PAYLOAD));

        ActivateNESwPayload activateNESwPayload = new ActivateNESwPayload();

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

        String targetSwVersion = String.valueOf(execution.getVariable(SoPropertyConstants.TARGET_SOFTWARE_VERSION));
        if (targetSwVersion == null) {
            targetSwVersion = JsonUtils.getJsonValue(requestPayload, "targetSwVersion");
        }
        activateNESwPayload.setSwVersionToBeActivated(targetSwVersion);

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

        return activateNESwPayload;
    }

}