io.gravitee.rest.api.model.InstanceListItem Maven / Gradle / Ivy
/*
* Copyright © 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gravitee.rest.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* @author David BRASSELY (david at gravitee.io)
* @author GraviteeSource Team
*/
public class InstanceListItem {
private String event;
private String id;
@JsonProperty("started_at")
private Date startedAt;
@JsonProperty("last_heartbeat_at")
private Date lastHeartbeatAt;
@JsonProperty("stopped_at")
private Date stoppedAt;
private String hostname;
private String ip;
private String port;
private String version;
private List tags;
private String tenant;
private InstanceState state = InstanceState.UNKNOWN;
@JsonProperty("operating_system_name")
private String operatingSystemName;
public InstanceListItem(String id) {
this.id = id;
}
public InstanceListItem() {}
public String getHostname() {
return hostname;
}
public void setHostname(String hostname) {
this.hostname = hostname;
}
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public Date getLastHeartbeatAt() {
return lastHeartbeatAt;
}
public void setLastHeartbeatAt(Date lastHeartbeatAt) {
this.lastHeartbeatAt = lastHeartbeatAt;
}
public Date getStartedAt() {
return startedAt;
}
public void setStartedAt(Date startedAt) {
this.startedAt = startedAt;
}
public InstanceState getState() {
return state;
}
public void setState(InstanceState state) {
this.state = state;
}
public Date getStoppedAt() {
return stoppedAt;
}
public void setStoppedAt(Date stoppedAt) {
this.stoppedAt = stoppedAt;
}
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getOperatingSystemName() {
return operatingSystemName;
}
public void setOperatingSystemName(String operatingSystemName) {
this.operatingSystemName = operatingSystemName;
}
public String getTenant() {
return tenant;
}
public void setTenant(String tenant) {
this.tenant = tenant;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
InstanceListItem that = (InstanceListItem) o;
return Objects.equals(id, that.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy