Class ImportSummaryBuilder

java.lang.Object
com.commercetools.importapi.models.importsummaries.ImportSummaryBuilder
All Implemented Interfaces:
Builder<ImportSummary>

public class ImportSummaryBuilder extends Object implements Builder<ImportSummary>
ImportSummaryBuilder
Example to create an instance using the builder pattern

     ImportSummary importSummary = ImportSummary.builder()
             .states(statesBuilder -> statesBuilder)
             .total(1)
             .build()
 
  • Constructor Details

    • ImportSummaryBuilder

      public ImportSummaryBuilder()
  • Method Details

    • states

      The import status of an ImportContainer given by the number of resources in each Processing State.

      Parameters:
      builder - function to build the states value
      Returns:
      Builder
    • withStates

      The import status of an ImportContainer given by the number of resources in each Processing State.

      Parameters:
      builder - function to build the states value
      Returns:
      Builder
    • states

      public ImportSummaryBuilder states(OperationStates states)

      The import status of an ImportContainer given by the number of resources in each Processing State.

      Parameters:
      states - value to be set
      Returns:
      Builder
    • total

      public ImportSummaryBuilder total(Long total)

      The total number of ImportOperations received for this Import Summary.

      Parameters:
      total - value to be set
      Returns:
      Builder
    • getStates

      public OperationStates getStates()

      The import status of an ImportContainer given by the number of resources in each Processing State.

      Returns:
      states
    • getTotal

      public Long getTotal()

      The total number of ImportOperations received for this Import Summary.

      Returns:
      total
    • build

      public ImportSummary build()
      builds ImportSummary with checking for non-null required values
      Specified by:
      build in interface Builder<ImportSummary>
      Returns:
      ImportSummary
    • buildUnchecked

      public ImportSummary buildUnchecked()
      builds ImportSummary without checking for non-null required values
      Returns:
      ImportSummary
    • of

      public static ImportSummaryBuilder of()
      factory method for an instance of ImportSummaryBuilder
      Returns:
      builder
    • of

      public static ImportSummaryBuilder of(ImportSummary template)
      create builder for ImportSummary instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder