16 package org.openkilda.messaging.info.event;
18 import static com.google.common.base.MoreObjects.toStringHelper;
23 import com.fasterxml.jackson.annotation.JsonCreator;
24 import com.fasterxml.jackson.annotation.JsonInclude;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
29 import java.util.Objects;
38 @JsonInclude(JsonInclude.Include.NON_NULL)
50 private static final long serialVersionUID = 1L;
55 @JsonProperty(
"switch_id")
61 @JsonProperty(
"address")
62 private String address;
67 @JsonProperty(
"hostname")
68 private String hostname;
73 @JsonProperty(
"description")
79 @JsonProperty(
"state")
85 @JsonProperty(
"controller")
86 private String controller;
107 @JsonProperty(
"address")
final String address,
108 @JsonProperty(
"hostname")
final String hostname,
109 @JsonProperty(
"description")
final String
description,
110 @JsonProperty(
"controller")
final String controller) {
111 this.switchId = switchId;
113 this.address = address;
114 this.hostname = hostname;
116 this.controller = controller;
134 this.switchId = switchId;
170 this.address = address;
188 this.hostname = hostname;
224 this.controller = controller;
232 return toStringHelper(
this)
233 .add(
"switch_id", switchId)
235 .add(
"address", address)
236 .add(
"hostname", hostname)
238 .add(
"controller", controller)
247 return Objects.hash(switchId, state, address, hostname,
description, controller);
255 if (
this ==
object) {
258 if (
object == null || getClass() !=
object.getClass()) {
264 && Objects.equals(getState(), that.
getState())
265 && Objects.equals(getAddress(), that.
getAddress())
266 && Objects.equals(getHostname(), that.
getHostname())
void setController(String controller)
void setSwitchId(final SwitchId switchId)
void setState(final SwitchState state)
SwitchInfoData(@JsonProperty("switch_id") final SwitchId switchId, @JsonProperty("state") final SwitchState state, @JsonProperty("address") final String address, @JsonProperty("hostname") final String hostname, @JsonProperty("description") final String description, @JsonProperty("controller") final String controller)
void setHostname(String hostname)
boolean equals(Object object)
void setAddress(String address)
void setDescription(String description)