Class TypeResourceIdentifierBuilder

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

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

     TypeResourceIdentifier typeResourceIdentifier = TypeResourceIdentifier.builder()
             .build()
 
  • Constructor Details

    • TypeResourceIdentifierBuilder

      public TypeResourceIdentifierBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Type. Required if key is absent.

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

      User-defined unique identifier of the referenced Type. Required if id is absent.

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

      @Nullable public String getId()

      Unique identifier of the referenced Type. Required if key is absent.

      Returns:
      id
    • getKey

      @Nullable public String getKey()

      User-defined unique identifier of the referenced Type. Required if id is absent.

      Returns:
      key
    • build

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

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

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

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