Class CategoryChangeSlugActionBuilder

java.lang.Object
com.commercetools.api.models.category.CategoryChangeSlugActionBuilder
All Implemented Interfaces:
Builder<CategoryChangeSlugAction>

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

     CategoryChangeSlugAction categoryChangeSlugAction = CategoryChangeSlugAction.builder()
             .slug(slugBuilder -> slugBuilder)
             .build()
 
  • Constructor Details

    • CategoryChangeSlugActionBuilder

      public CategoryChangeSlugActionBuilder()
  • Method Details

    • slug

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

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

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

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

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

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

      public LocalizedString getSlug()

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

      Returns:
      slug
    • build

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

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

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

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