Class AttributesBuilder

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

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

     Attributes attributes = Attributes.builder()
             .build()
 
  • Constructor Details

  • Method Details

    • values

      The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • getValues

      The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).

      Returns:
      pattern properties
    • build

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

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

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

      public static AttributesBuilder of(Attributes template)
      create builder for Attributes instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder