All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.navigator.GetResourcesResponse Maven / Gradle / Ivy

package org.molgenis.navigator;

import com.google.auto.value.AutoValue;
import java.util.List;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.molgenis.navigator.model.Resource;
import org.molgenis.util.AutoGson;

@AutoValue
@AutoGson(autoValueClass = AutoValue_GetResourcesResponse.class)
@SuppressWarnings(
    "squid:S1610") // Abstract classes without fields should be converted to interfaces
public abstract class GetResourcesResponse {
  /** @return null folder implies the root package */
  @Nullable
  @CheckForNull
  public abstract Folder getFolder();

  public abstract List getResources();

  public static GetResourcesResponse create(Folder newFolder, List newResources) {
    return builder().setFolder(newFolder).setResources(newResources).build();
  }

  public static Builder builder() {
    return new AutoValue_GetResourcesResponse.Builder();
  }

  @AutoValue.Builder
  public abstract static class Builder {

    public abstract Builder setFolder(Folder newFolder);

    public abstract Builder setResources(List newResources);

    public abstract GetResourcesResponse build();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy