code: public Integer delete(CMAUiExtension extension) {
      assertNotNull(extension, "extension");
      final Integer version = getVersionOrThrow(extension, "update");
      final String spaceId = getSpaceIdOrThrow(extension, "extension");
      assertNotNull(extension.getEnvironmentId(), "environmentId");
      final String environmentId = extension.getEnvironmentId();
      final String extensionId = getResourceIdOrThrow(extension, "extension");
  
      final CMASystem system = extension.getSystem();
      extension.setSystem(null);
  
      try {
        return service.delete(spaceId, environmentId, extensionId, version).blockingFirst().code();
      } finally {
        extension.setSystem(system);
      }
    }
docs: Delete a ui extension.
  
  @param extension the extension to be deleted.
  @return the http code of the action.
  @throws IllegalArgumentException if extension is null.
  @throws IllegalArgumentException if extension's id is null.
  @throws IllegalArgumentException if extension's version is null.
  @throws IllegalArgumentException if extension's spaceId is null.