Class CustomFieldEnumValueBuilder

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

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

     CustomFieldEnumValue customFieldEnumValue = CustomFieldEnumValue.builder()
             .key("{key}")
             .label("{label}")
             .build()
 
  • Constructor Details

    • CustomFieldEnumValueBuilder

      public CustomFieldEnumValueBuilder()
  • Method Details

    • key

      Key of the value used as a programmatic identifier.

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

      public CustomFieldEnumValueBuilder label(String label)

      Descriptive label of the value.

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

      public String getKey()

      Key of the value used as a programmatic identifier.

      Returns:
      key
    • getLabel

      public String getLabel()

      Descriptive label of the value.

      Returns:
      label
    • build

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

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

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

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