class PayloadClient {

    public static Optional<String> upgradeFormat(Optional<String> payload, String vnfName)
            throws JsonProcessingException {
        UpgradeAction payloadResult = new UpgradeAction();
        ConfigurationParametersUpgrade configParams = new ConfigurationParametersUpgrade();
        String payloadString = payload.isPresent() ? payload.get() : "";
        String existingSoftware = JsonUtils.getJsonValue(payloadString, "existing_software_version");
        String newSoftware = JsonUtils.getJsonValue(payloadString, "new_software_version");
        configParams.setExistingSoftwareVersion(existingSoftware);
        configParams.setNewSoftwareVersion(newSoftware);
        configParams.setVnfName(vnfName);
        payloadResult.setConfigurationParameters(configParams);
        return Optional.of(mapper.writeValueAsString(payloadResult));
    }

    private  PayloadClient();

}