package com.bbn.bue.common;

import com.google.common.annotations.Beta;

import org.immutables.value.Value;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This is the text group's default style for immutable objects generated using
 * the "Immutables.org" library. Use this whenever you use {@link org.immutables.value.Value.Immutable}
 * unless you have a strong reason to do otherwise.
 */
@Beta
@Target({ElementType.PACKAGE, ElementType.TYPE})
@Retention(RetentionPolicy.CLASS)
@Value.Style(
    // use the stripped abstract type name as the immutable type name
    // rather than prefixing "Immutable" as the default would do.
    // This is so that if we have _FlexibleEventMention,
    // the generated implementation is FlexibleEventMention, not
    // ImmutableFlexibleEventMention
    typeImmutable = "*",
    // the template class must be prefixed with _
    typeAbstract = {"_*"},
    // make the class annotated with this package private,
    // so API users only see the generated implementation, not
    // the template
    visibility = Value.Style.ImplementationVisibility.PUBLIC)
public @interface TextGroupPublicImmutable {
}


@@ -22,16 +22,146 @@
 ommon;%0A%0A
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;%0Aimport com.fasterxml.jackson.databind.annotation.JsonSerialize;%0A
 import c
@@ -584,16 +584,50 @@
 able%7D%0A *
+ for objects intended to be public
  unless 
@@ -1376,16 +1376,48 @@
 PUBLIC)%0A
+@JsonSerialize%0A@JsonDeserialize%0A
 public @
@@ -1456,8 +1456,9 @@
 le %7B%0A%7D%0A%0A
+%0A

Make Immutables type Jackson-serializable by default