Class BatchResponse<T>

java.lang.Object
com.helixframework.api.contract.HateoasResponse
com.helixframework.api.contract.batch.BatchResponse<T>
Type Parameters:
T - the type of the success items in the response

public class BatchResponse<T> extends HateoasResponse
Represents a batch response for a collection of items.
  • Method Details

    • builder

      public static <T> BatchResponse.Builder<T> builder(Class<T> clazz)
      Returns a new instance of Builder for creating BatchResponse objects.
      Type Parameters:
      T - the type of the success items in the response
      Parameters:
      clazz - the class of the success items in the response
      Returns:
      a new instance of Builder
    • getStatus

      public BatchStatus getStatus()
      Returns the status of the batch operation.
      Returns:
      the status of the batch operation
    • getItems

      public BatchItems<T> getItems()
      Retrieves the batch items from the BatchResponse.
      Returns:
      the batch items in the response
    • getSummary

      public BatchSummary getSummary()
      Returns a BatchSummary object that contains the total number of items, the number of successful items, and the number of failed items.
      Returns:
      a BatchSummary object representing the summary of the items in the batch response