aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/configserver/state/bindings/HealthResponse.java
blob: d0b94324941f8a93bf06427ad1810da59f37258d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.configserver.state.bindings;

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

/**
 * Response from /state/v1/health
 *
 * @author hakon
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class HealthResponse {
    @JsonProperty("status")
    public Status status = new Status();

    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Status {
        @JsonProperty("code")
        public String code = "down";

        @Override
        public String toString() {
            return "Status{" +
                    "code='" + code + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "HealthResponse{" +
                "status=" + status +
                '}';
    }
}