aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeUpgrade.java
blob: f7edad1d3c2aa84d49e2651a327ae4f01edb13bf (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
37
38
39
40
41
42
43
44
45
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.noderepository;

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

/**
 * @author mpolden
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class NodeUpgrade {

    @JsonProperty("version")
    private final String version;

    @JsonProperty("osVersion")
    private final String osVersion;

    @JsonProperty("force")
    private final boolean force;

    @JsonCreator
    public NodeUpgrade(@JsonProperty("version") String version, @JsonProperty("osVersion") String osVersion,
                       @JsonProperty("force") boolean force) {
        this.version = version;
        this.osVersion = osVersion;
        this.force = force;
    }

    public String getVersion() {
        return version;
    }

    public String getOsVersion() {
        return osVersion;
    }

    public boolean isForce() {
        return force;
    }

}