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;
35 @JsonInclude(JsonInclude.Include.NON_NULL)
45 private static final long serialVersionUID = 1L;
50 @JsonProperty(
"switch_id")
56 @JsonProperty(
"port_no")
61 @JsonProperty(
"max_capacity")
62 private Integer maxCapacity;
67 @JsonProperty(
"state")
82 this.switchId =
path.getSwitchId();
83 this.portNo =
path.getPortNo();
95 this.switchId = switchId;
110 @JsonProperty(
"port_no")
final int portNo,
111 @JsonProperty(
"max_capacity")
final Integer maxCapacity,
113 this.switchId = switchId;
114 this.portNo = portNo;
115 this.maxCapacity = maxCapacity;
134 this.switchId = switchId;
152 this.portNo = portNo;
170 this.maxCapacity = maxCapacity;
196 return toStringHelper(
this)
197 .add(
"switch_id", switchId)
198 .add(
"port_no", portNo)
199 .add(
"max_capacity", maxCapacity)
209 return Objects.hash(switchId, portNo, maxCapacity, state);
217 if (
this ==
object) {
220 if (
object == null || getClass() !=
object.getClass()) {
226 && Objects.equals(getPortNo(), that.
getPortNo())
228 && Objects.equals(getState(), that.
getState());
void setMaxCapacity(final int maxCapacity)
void setState(final PortChangeType state)
void setSwitchId(final SwitchId switchId)
PortInfoData(@JsonProperty("switch_id") final SwitchId switchId, @JsonProperty("port_no") final int portNo, @JsonProperty("max_capacity") final Integer maxCapacity, @JsonProperty("state") final PortChangeType state)
PortInfoData(PathNode path)
void setPortNo(final int portNo)
PortChangeType getState()
boolean equals(Object object)
PortInfoData(final SwitchId switchId, final int portNo, final PortChangeType state)