Class ImportContainerDraftBuilder

java.lang.Object
com.commercetools.importapi.models.importcontainers.ImportContainerDraftBuilder
All Implemented Interfaces:
Builder<ImportContainerDraft>

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

     ImportContainerDraft importContainerDraft = ImportContainerDraft.builder()
             .key("{key}")
             .build()
 
  • Constructor Details

    • ImportContainerDraftBuilder

      public ImportContainerDraftBuilder()
  • Method Details

    • key

      User-defined unique identifier of the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).

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

      public ImportContainerDraftBuilder resourceType(@Nullable ImportResourceType resourceType)

      The resource type to be imported. If not given, the ImportContainer is able to import all of the supported ImportResourceTypes.

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

      public String getKey()

      User-defined unique identifier of the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).

      Returns:
      key
    • getResourceType

      @Nullable public ImportResourceType getResourceType()

      The resource type to be imported. If not given, the ImportContainer is able to import all of the supported ImportResourceTypes.

      Returns:
      resourceType
    • build

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

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

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

      create builder for ImportContainerDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder