aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java
blob: 3e2080e8e87eb07e6c0ca293c04913173e3e65c3 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.staterestapi.response;

/**
 * The response of a set operation.
 *
 * @author Haakon Dybdahl
 */
public class SetResponse {

    private final String reason;
    private final boolean wasModified;

    public SetResponse(String reason, boolean wasModified) {
        this.reason = reason;
        this.wasModified = wasModified;
    }

    /**
     * Indicates if data was modified in a set operation.
     *
     * @return true if modified.
     */
    public boolean getWasModified() { return wasModified; }

    /**
     * Human-readable reason.
     *
     * @return reason as string
     */
    public String getReason() { return reason; }

}