protected static ServiceConfigVersionRequest getServiceConfigVersionRequest(String parentCategory, Map<String, Object> properties) {
    ServiceConfigVersionRequest serviceConfigVersionRequest = null;

    for (Map.Entry<String, Object> entry : properties.entrySet()) {
      String absCategory = PropertyHelper.getPropertyCategory(entry.getKey());
      String propName = PropertyHelper.getPropertyName(entry.getKey());

      if (absCategory != null &&
              absCategory.startsWith(parentCategory + "/desired_service_config_version")) {
        serviceConfigVersionRequest =
            (serviceConfigVersionRequest ==null ) ? new ServiceConfigVersionRequest() : serviceConfigVersionRequest;

        if (propName != null) {
          switch (propName) {
            case "service_name": {
              serviceConfigVersionRequest.setServiceName(entry.getValue().toString());
              break;
            }
            case "service_config_version": {
              serviceConfigVersionRequest.setVersion(Long.valueOf(entry.getValue().toString()));
              break;
            }
            case "service_config_version_note": {
              serviceConfigVersionRequest.setNote(entry.getValue().toString());
              break;
            }
          }
        }
      }
    }
    return serviceConfigVersionRequest;
  }
Helper method for creating rollback request
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java