Class AttributePlainEnumValueBuilder

java.lang.Object
com.commercetools.api.models.product_type.AttributePlainEnumValueBuilder
All Implemented Interfaces:
Builder<AttributePlainEnumValue>

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

     AttributePlainEnumValue attributePlainEnumValue = AttributePlainEnumValue.builder()
             .key("{key}")
             .label("{label}")
             .build()
 
  • Constructor Details

    • AttributePlainEnumValueBuilder

      public AttributePlainEnumValueBuilder()
  • Method Details

    • key

      Key of the value used as a programmatic identifier, for example in facets & filters.

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

      public AttributePlainEnumValueBuilder 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, for example in facets & filters.

      Returns:
      key
    • getLabel

      public String getLabel()

      Descriptive label of the value.

      Returns:
      label
    • build

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

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

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

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