// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.routing.status;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yahoo.vespa.hosted.controller.api.integration.routing.RotationStatus;

/**
 * @author bjorncs
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class StatusReply {

    public final RotationStatus status;
    public final long lastUpdate;
    public final String cause;
    public final String agent;

    @JsonCreator
    public StatusReply(@JsonProperty("status") RotationStatus status,
                       @JsonProperty("lastUpdate") long lastUpdate,
                       @JsonProperty("cause") String cause,
                       @JsonProperty("agent") String agent) {
        this.status = status;
        this.lastUpdate = lastUpdate;
        this.cause = cause;
        this.agent = agent;
    }
    
}

@@ -302,16 +302,69 @@
 erties;%0A
+import com.fasterxml.jackson.annotation.JsonInclude;%0A
 import c
@@ -562,16 +562,67 @@
 = true)%0A
+@JsonInclude(value = JsonInclude.Include.NON_NULL)%0A
 public c
@@ -640,24 +640,48 @@
 Reply %7B%0A%0A   
+ @JsonProperty(%22status%22)
  public fina
@@ -704,24 +704,52 @@
  status;%0A   
+ @JsonProperty(%22lastUpdate%22)
  public fina
@@ -766,24 +766,47 @@
 tUpdate;%0A   
+ @JsonProperty(%22cause%22)
  public fina
@@ -820,24 +820,47 @@
 g cause;%0A   
+ @JsonProperty(%22agent%22)
  public fina

Add serialization annotations to StatusReply