Class ProductChangeSlugActionBuilder

java.lang.Object
com.commercetools.api.models.product.ProductChangeSlugActionBuilder
All Implemented Interfaces:
Builder<ProductChangeSlugAction>

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

     ProductChangeSlugAction productChangeSlugAction = ProductChangeSlugAction.builder()
             .slug(slugBuilder -> slugBuilder)
             .build()
 
  • Constructor Details

    • ProductChangeSlugActionBuilder

      public ProductChangeSlugActionBuilder()
  • Method Details

    • slug

      Value to set. Must not be empty. A Product can have the same slug for different Locales, but it must be unique across the Project. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

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

      Value to set. Must not be empty. A Product can have the same slug for different Locales, but it must be unique across the Project. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

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

      Value to set. Must not be empty. A Product can have the same slug for different Locales, but it must be unique across the Project. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

      Parameters:
      slug - value to be set
      Returns:
      Builder
    • staged

      If true, only the staged slug is updated. If false, both the current and staged slug are updated.

      Parameters:
      staged - value to be set
      Returns:
      Builder
    • getSlug

      public LocalizedString getSlug()

      Value to set. Must not be empty. A Product can have the same slug for different Locales, but it must be unique across the Project. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$.

      Returns:
      slug
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged slug is updated. If false, both the current and staged slug are updated.

      Returns:
      staged
    • build

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

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

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

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