Open Kilda Java Documentation
PortStatsData.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.messaging.info.stats;
17 
20 
21 import com.fasterxml.jackson.annotation.JsonInclude;
22 import com.fasterxml.jackson.annotation.JsonProperty;
23 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
24 
25 import java.util.List;
26 
30 @JsonInclude(JsonInclude.Include.NON_NULL)
31 @JsonPropertyOrder({
32  "message_type",
33  "switch_id",
34  "stats"})
35 public class PortStatsData extends InfoData {
36 
37  private static final long serialVersionUID = 1L;
38 
39  @JsonProperty("switch_id")
40  private SwitchId switchId;
41 
42  @JsonProperty
43  private List<PortStatsReply> stats;
44 
45  public PortStatsData(@JsonProperty("switch_id") SwitchId switchId,
46  @JsonProperty("stats") List<PortStatsReply> switchStats) {
47  this.switchId = switchId;
48  this.stats = switchStats;
49  }
50 
51  public SwitchId getSwitchId() {
52  return switchId;
53  }
54 
55  public List<PortStatsReply> getStats() {
56  return stats;
57  }
58 }
PortStatsData(@JsonProperty("switch_id") SwitchId switchId, @JsonProperty("stats") List< PortStatsReply > switchStats)