Interface ProductResourceIdentifier

All Superinterfaces:
Identifiable<Product>, ResourceIdentifier, WithKey

public interface ProductResourceIdentifier extends ResourceIdentifier, Identifiable<Product>

ResourceIdentifier to a Product. Either id or key is required. If both are set, an InvalidJsonInput error is returned.


Example to create an instance using the builder pattern

     ProductResourceIdentifier productResourceIdentifier = ProductResourceIdentifier.builder()
             .build()
 
  • Field Details

  • Method Details

    • getId

      String getId()

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

      Specified by:
      getId in interface Identifiable<Product>
      Specified by:
      getId in interface ResourceIdentifier
      Returns:
      id
    • getKey

      String getKey()

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

      Specified by:
      getKey in interface ResourceIdentifier
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setId

      void setId(String id)

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

      Specified by:
      setId in interface ResourceIdentifier
      Parameters:
      id - value to be set
    • setKey

      void setKey(String key)

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

      Specified by:
      setKey in interface ResourceIdentifier
      Parameters:
      key - value to be set
    • of

      factory method
      Returns:
      instance of ProductResourceIdentifier
    • of

      factory method to create a shallow copy ProductResourceIdentifier
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ProductResourceIdentifier deepCopy(@Nullable ProductResourceIdentifier template)
      factory method to create a deep copy of ProductResourceIdentifier
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductResourceIdentifier
      Returns:
      builder
    • builder

      create builder for ProductResourceIdentifier instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductResourceIdentifier

      default <T> T withProductResourceIdentifier(Function<ProductResourceIdentifier,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductResourceIdentifier> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference