Class TypeChangeLabelActionBuilder

java.lang.Object
com.commercetools.api.models.type.TypeChangeLabelActionBuilder
All Implemented Interfaces:
Builder<TypeChangeLabelAction>

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

     TypeChangeLabelAction typeChangeLabelAction = TypeChangeLabelAction.builder()
             .fieldName("{fieldName}")
             .label(labelBuilder -> labelBuilder)
             .build()
 
  • Constructor Details

    • TypeChangeLabelActionBuilder

      public TypeChangeLabelActionBuilder()
  • Method Details

    • fieldName

      public TypeChangeLabelActionBuilder fieldName(String fieldName)

      Name of the Field Definition to update.

      Parameters:
      fieldName - value to be set
      Returns:
      Builder
    • label

      JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

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

      JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

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

      JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

      Parameters:
      label - value to be set
      Returns:
      Builder
    • getFieldName

      public String getFieldName()

      Name of the Field Definition to update.

      Returns:
      fieldName
    • getLabel

      public LocalizedString getLabel()

      JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

      Returns:
      label
    • build

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

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

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

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