package io.reactivesw.products.models.attributes;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by umasuo on 16/11/17.
 */
@ApiModel
public class Attribute {

  @ApiModelProperty(value = "Attribute Name", required = true)
  private String name;

  @ApiModelProperty(value = "A valid JSON value, based on an AttributeDefinition.",required = true)
  private String value;

  /**
   * Gets name.
   *
   * @return the name
   */
  public String getName() {
    return name;
  }

  /**
   * Sets name.
   *
   * @param name the name
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * Gets value.
   *
   * @return the value
   */
  public String getValue() {
    return value;
  }

  /**
   * Sets value.
   *
   * @param value the value
   */
  public void setValue(String value) {
    this.value = value;
  }

  /**
   * toString method.
   * @return String
   */
  @Override
  public String toString() {
    return "Attribute{" +
        "name='" + name + '\'' +
        ", value='" + value + '\'' +
        '}';
  }
}

@@ -44,16 +44,182 @@
 butes;%0A%0A
+import com.fasterxml.jackson.annotation.JsonCreator;%0Aimport com.fasterxml.jackson.databind.JsonNode;%0Aimport com.fasterxml.jackson.databind.annotation.JsonSerialize;%0A%0A
 import i
@@ -570,85 +570,65 @@
 )%0A  
-private String value;%0A%0A  /**%0A   * Gets name.%0A   *%0A   * @return the name%0A   */
+@JsonSerialize%0A  private JsonNode value;%0A%0A%0A  @JsonCreator
 %0A  p
@@ -637,228 +637,111 @@
 lic 
-String getName() %7B%0A    return name;%0A  %7D%0A%0A  /**%0A   * Sets name.%0A   *%0A   * @param name the name%0A   */%0A  public void setName(String name) %7B%0A    this.name = name;%0A  %7D%0A%0A  /**%0A   * Gets value.%0A   *%0A   * @return the
+Attribute(final String name, final JsonNode value) %7B%0A    this.name = name;%0A    this.value =
  value
+;
 %0A  
- */
+%7D%0A
 %0A  p
@@ -756,20 +756,19 @@
 ring get
-Valu
+Nam
 e() %7B%0A  
@@ -776,20 +776,19 @@
  return 
-valu
+nam
 e;%0A  %7D%0A%0A
@@ -793,338 +793,53 @@
 %0A%0A  
-/**%0A   * Sets value.%0A   *%0A   * @param value the value%0A   */%0A  public void setValue(String value) %7B%0A    this.value = value;%0A  %7D%0A%0A  /**%0A   * toString method.%0A   * @return String%0A   */%0A  @Override%0A  public String toString() %7B%0A    return %22Attribute%7B%22 +%0A        %22name='%22 + name + '%5C'' +%0A        %22, value='%22 + value + '%5C'' +%0A        '%7D'
+public JsonNode getValue() %7B%0A    return value
 ;%0A  

use JsonNode