Open Kilda Java Documentation
AddSwitchCommand.java
Go to the documentation of this file.
1 package org.openkilda.simulator.messages.simulator.command;
2 
4 
5 import com.fasterxml.jackson.annotation.JsonInclude;
6 import com.fasterxml.jackson.annotation.JsonProperty;
7 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
8 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9 
10 @JsonSerialize
11 @JsonInclude(JsonInclude.Include.NON_NULL)
12 @JsonPropertyOrder(value = {
13  "dpid",
14  "num_of_ports"})
15 
17  @JsonProperty("dpid")
18  private SwitchId dpid;
19 
20  @JsonProperty("num_of_ports")
21  private int numOfPorts;
22 
23  public AddSwitchCommand(@JsonProperty("dpid") SwitchId dpid,
24  @JsonProperty("num_of_ports") int numOfPorts) {
25  this.dpid = dpid;
26  this.numOfPorts = numOfPorts;
27  }
28 
29  public SwitchId getDpid() {
30  return dpid;
31  }
32 
33  public int getNumOfPorts() {
34  return numOfPorts;
35  }
36 
37  public void setNumOfPorts(int numOfPorts) {
38  this.numOfPorts = numOfPorts;
39  }
40 }
AddSwitchCommand(@JsonProperty("dpid") SwitchId dpid, @JsonProperty("num_of_ports") int numOfPorts)
value
Definition: nodes.py:62