package com.github.davidmoten.fsm.example.shop.catalogproduct;

import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public final class CatalogProduct {

    public final String catalogId;
    public final String productId;
    // Note that we have a copy of the Product attributes for query performance
    // purposes
    public final String name;
    public final String description;
    public final int quantity;
    public final BigDecimal price;
    public final List<String> tags;

    public CatalogProduct(@JsonProperty("catalogId") String catalogId, @JsonProperty("productId") String productId,
            @JsonProperty("name") String name, @JsonProperty("description") String description,
            @JsonProperty("price") BigDecimal price, @JsonProperty("tags") List<String> tags,
            @JsonProperty("quantity") int quantity) {
        this.catalogId = catalogId;
        this.productId = productId;
        this.name = name;
        this.description = description;
        this.price = price;
        this.tags = tags;
        this.quantity = quantity;
    }

    public static String idFrom(String catalogId, String productId) {
        return catalogId + "|" + productId;
    }

}

@@ -114,116 +114,8 @@
 t;%0A%0A
-import com.fasterxml.jackson.annotation.JsonCreator;%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0A%0A
 publ
@@ -513,325 +513,125 @@
 uct(
-@JsonProperty(%22catalogId%22) String catalogId, @JsonProperty(%22productId%22) String productId,%0A            @JsonProperty(%22name%22) String name, @JsonProperty(%22description%22) String description,%0A            @JsonProperty(%22price%22) BigDecimal price, @JsonProperty(%22tags%22) List%3CString%3E tags,%0A            @JsonProperty(%22quantity%22)
+String catalogId, String productId, String name, String description, BigDecimal price,%0A            List%3CString%3E tags,
  int

remove jackson annotations from CatalogProduct