package com.hubspot.singularity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonTypeInfo(use = Id.MINIMAL_CLASS, include = As.PROPERTY, property = "@class")
@JsonSubTypes({
  @Type(value = SingularityTaskShellCommandRequest.class, name = "SHELL_COMMAND"),
  @Type(value = SingularityTaskDestroyFrameworkMessage.class, name = "TASK_KILL")
})
public abstract class SingularityFrameworkMessage {
  public abstract SingularityTaskId getTaskId();
}

@@ -495,16 +495,72 @@
 %22@class%22
+, defaultImpl = SingularityTaskShellCommandRequest.class
 )%0A@JsonS

add defaultImpl to JsonTypeInfo on framework message class