Class ImportResourceBuilder

java.lang.Object
com.commercetools.importapi.models.common.ImportResourceBuilder
All Implemented Interfaces:
Builder<ImportResource>

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

     ImportResource importResource = ImportResource.builder()
             .key("{key}")
             .build()
 
  • Constructor Details

    • ImportResourceBuilder

      public ImportResourceBuilder()
  • Method Details

    • key

      public ImportResourceBuilder key(String key)

      User-defined unique identifier.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()

      User-defined unique identifier.

      Returns:
      key
    • build

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

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

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

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