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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.identityprovider.api.bindings;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* @author bjorncs
*/
public class VespaUniqueInstanceIdEntity {
@JsonProperty("tenant")
public final String tenant;
@JsonProperty("application")
public final String application;
@JsonProperty("environment")
public final String environment;
@JsonProperty("region")
public final String region;
@JsonProperty("instance")
public final String instance;
@JsonProperty("cluster-id")
public final String clusterId;
@JsonProperty("cluster-index")
public final int clusterIndex;
public VespaUniqueInstanceIdEntity(@JsonProperty("tenant") String tenant,
@JsonProperty("application") String application,
@JsonProperty("environment") String environment,
@JsonProperty("region") String region,
@JsonProperty("instance") String instance,
@JsonProperty("cluster-id") String clusterId,
@JsonProperty("cluster-index") int clusterIndex) {
this.tenant = tenant;
this.application = application;
this.environment = environment;
this.region = region;
this.instance = instance;
this.clusterId = clusterId;
this.clusterIndex = clusterIndex;
}
@Override
public String toString() {
return "VespaUniqueInstanceIdEntity{" +
"tenant='" + tenant + '\'' +
", application='" + application + '\'' +
", environment='" + environment + '\'' +
", region='" + region + '\'' +
", instance='" + instance + '\'' +
", clusterId='" + clusterId + '\'' +
", clusterIndex=" + clusterIndex +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VespaUniqueInstanceIdEntity that = (VespaUniqueInstanceIdEntity) o;
return clusterIndex == that.clusterIndex &&
Objects.equals(tenant, that.tenant) &&
Objects.equals(application, that.application) &&
Objects.equals(environment, that.environment) &&
Objects.equals(region, that.region) &&
Objects.equals(instance, that.instance) &&
Objects.equals(clusterId, that.clusterId);
}
@Override
public int hashCode() {
return Objects.hash(tenant, application, environment, region, instance, clusterId, clusterIndex);
}
}
|