aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/SlobrokEntryResponse.java
blob: b25d01b95e69b98c9d0d1a3e1c07c16bc8e4f4ae (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
46
47
48
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.orchestrator.restapi.wire;

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

import java.util.Objects;

/**
 * @author hakonhall
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class SlobrokEntryResponse {
    @JsonProperty("name")
    public final String name;

    @JsonProperty("spec")
    public final String spec;

    @JsonCreator
    public SlobrokEntryResponse(@JsonProperty("name") String name, @JsonProperty("spec") String spec) {
        this.name = name;
        this.spec = spec;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SlobrokEntryResponse that = (SlobrokEntryResponse) o;
        return Objects.equals(name, that.name) &&
                Objects.equals(spec, that.spec);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, spec);
    }

    @Override
    public String toString() {
        return "SlobrokEntryResponse{" +
                "name='" + name + '\'' +
                ", spec='" + spec + '\'' +
                '}';
    }
}