aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java
blob: bda56c4b5a06e3ae57d416c5293f4290dc31e597 (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
// Copyright 2017 Yahoo Holdings. 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 dybis
 */
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; }
}