Class ResourceIdentifierBuilder

java.lang.Object
com.commercetools.history.models.common.ResourceIdentifierBuilder
All Implemented Interfaces:
Builder<ResourceIdentifier>

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

     ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
             .typeId(ReferenceTypeId.APPROVAL_FLOW)
             .build()
 
  • Constructor Details

    • ResourceIdentifierBuilder

      public ResourceIdentifierBuilder()
  • Method Details

    • id

      public ResourceIdentifierBuilder id(@Nullable String id)
      set the value to the id
      Parameters:
      id - value to be set
      Returns:
      Builder
    • key

      public ResourceIdentifierBuilder key(@Nullable String key)
      set the value to the key
      Parameters:
      key - value to be set
      Returns:
      Builder
    • typeId

      Type of resource the value should reference. Supported resource type identifiers are:

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

      @Nullable public String getId()
      value of id}
      Returns:
      id
    • getKey

      @Nullable public String getKey()
      value of key}
      Returns:
      key
    • getTypeId

      public ReferenceTypeId getTypeId()

      Type of resource the value should reference. Supported resource type identifiers are:

      Returns:
      typeId
    • build

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

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

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

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