Class ReferenceAttributeBuilder

java.lang.Object
com.commercetools.importapi.models.productvariants.ReferenceAttributeBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ReferenceAttribute>

public class ReferenceAttributeBuilder extends Object implements io.vrap.rmf.base.client.Builder<ReferenceAttribute>
ReferenceAttributeBuilder
Example to create an instance using the builder pattern

     ReferenceAttribute referenceAttribute = ReferenceAttribute.builder()
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

  • Method Details

    • name

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • value

      References a resource by key.

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

      public ReferenceAttributeBuilder value(Function<KeyReferenceBuilder,io.vrap.rmf.base.client.Builder<? extends KeyReference>> builder)

      References a resource by key.

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

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

      Returns:
      name
    • getValue

      References a resource by key.

      Returns:
      value
    • build

      builds ReferenceAttribute with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ReferenceAttribute>
      Returns:
      ReferenceAttribute
    • buildUnchecked

      builds ReferenceAttribute without checking for non-null required values
      Returns:
      ReferenceAttribute
    • of

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

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