Class VariantBulkUpdateItemBuilder

java.lang.Object
com.commercetools.api.models.variant.VariantBulkUpdateItemBuilder
All Implemented Interfaces:
Builder<VariantBulkUpdateItem>

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

     VariantBulkUpdateItem variantBulkUpdateItem = VariantBulkUpdateItem.builder()
             .build()
 
  • Constructor Details

    • VariantBulkUpdateItemBuilder

      public VariantBulkUpdateItemBuilder()
  • Method Details

    • id

      public VariantBulkUpdateItemBuilder id(@Nullable String id)

      Unique identifier of the Variant to update. Either id or key must be provided.

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

      public VariantBulkUpdateItemBuilder key(@Nullable String key)

      User-defined unique identifier of the Variant to update. Either id or key must be provided.

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

      public VariantBulkUpdateItemBuilder version(@Nullable Long version)

      Expected version of the Variant. Required when the versionControl query parameter is On (the default). If the version does not match, a ConcurrentModification error is returned for that item. Not required when versionControl=Off.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • getId

      @Nullable public String getId()

      Unique identifier of the Variant to update. Either id or key must be provided.

      Returns:
      id
    • getKey

      @Nullable public String getKey()

      User-defined unique identifier of the Variant to update. Either id or key must be provided.

      Returns:
      key
    • getVersion

      @Nullable public Long getVersion()

      Expected version of the Variant. Required when the versionControl query parameter is On (the default). If the version does not match, a ConcurrentModification error is returned for that item. Not required when versionControl=Off.

      Returns:
      version
    • build

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

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

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

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