Interface VariantCreatedMessage

All Superinterfaces:
BaseResource, DomainResource<Message>, Identifiable<Message>, Message, Versioned<Message>

public interface VariantCreatedMessage extends Message

Generated after a successful Create Variant request.


Example to create an instance using the builder pattern

     VariantCreatedMessage variantCreatedMessage = VariantCreatedMessage.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .sequenceNumber(0.3)
             .resource(resourceBuilder -> resourceBuilder)
             .resourceVersion(0.3)
             .productId("{productId}")
             .variantId(1)
             .publish(true)
             .build()
 
  • Field Details

  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Variant.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Message>
      Specified by:
      getId in interface Identifiable<Message>
      Specified by:
      getId in interface Message
      Specified by:
      getId in interface Versioned<Message>
      Returns:
      id
    • getProductId

      @NotNull @NotNull String getProductId()

      Unique identifier of the Product to which the Variant belongs.

      Returns:
      productId
    • getVariantId

      @NotNull @NotNull Integer getVariantId()

      Unique identifier of the Variant within its parent Product.

      Returns:
      variantId
    • getKey

      String getKey()

      User-defined unique identifier of the Variant.

      Returns:
      key
    • getSku

      String getSku()

      SKU of the Variant.

      Returns:
      sku
    • getAttributes

      @Valid @Valid List<Attribute> getAttributes()

      Attributes of the Variant.

      Returns:
      attributes
    • getAssets

      @Valid @Valid List<Asset> getAssets()

      Assets of the Variant.

      Returns:
      assets
    • getImages

      @Valid @Valid List<Image> getImages()

      Images of the Variant.

      Returns:
      images
    • getPublish

      @NotNull @NotNull Boolean getPublish()

      Whether the Variant was published.

      Returns:
      publish
    • setId

      void setId(String id)

      Unique identifier of the Variant.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Message
      Parameters:
      id - value to be set
    • setProductId

      void setProductId(String productId)

      Unique identifier of the Product to which the Variant belongs.

      Parameters:
      productId - value to be set
    • setVariantId

      void setVariantId(Integer variantId)

      Unique identifier of the Variant within its parent Product.

      Parameters:
      variantId - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Variant.

      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      SKU of the Variant.

      Parameters:
      sku - value to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      Attributes of the Variant.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Attributes of the Variant.

      Parameters:
      attributes - values to be set
    • setAssets

      void setAssets(Asset... assets)

      Assets of the Variant.

      Parameters:
      assets - values to be set
    • setAssets

      void setAssets(List<Asset> assets)

      Assets of the Variant.

      Parameters:
      assets - values to be set
    • setImages

      void setImages(Image... images)

      Images of the Variant.

      Parameters:
      images - values to be set
    • setImages

      void setImages(List<Image> images)

      Images of the Variant.

      Parameters:
      images - values to be set
    • setPublish

      void setPublish(Boolean publish)

      Whether the Variant was published.

      Parameters:
      publish - value to be set
    • of

      static VariantCreatedMessage of()
      factory method
      Returns:
      instance of VariantCreatedMessage
    • of

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

      Specified by:
      copyDeep in interface BaseResource
      Specified by:
      copyDeep in interface Message
    • deepCopy

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

      static VariantCreatedMessageBuilder builder()
      builder factory method for VariantCreatedMessage
      Returns:
      builder
    • builder

      create builder for VariantCreatedMessage instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantCreatedMessage

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

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