Open Kilda Java Documentation
PortEntry.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.atdd.utils.controller;
17 
18 import com.fasterxml.jackson.annotation.JsonCreator;
19 import com.fasterxml.jackson.annotation.JsonInclude;
20 import com.fasterxml.jackson.annotation.JsonProperty;
21 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
22 
23 import java.io.Serializable;
24 import java.util.List;
25 
26 @JsonSerialize
27 @JsonInclude(JsonInclude.Include.NON_NULL)
28 public class PortEntry implements Serializable {
29 
30  @JsonProperty("port_number")
31  private String portNumber;
32 
33  @JsonProperty("hardware_address")
34  private String hardwareAddress;
35 
36  @JsonProperty("name")
37  private String name;
38 
39  @JsonProperty("config")
40  private List<String> config;
41 
42  @JsonProperty("state")
43  private List<String> state;
44 
45  @JsonProperty("current_features")
46  private List<String> currentFeatures;
47 
48  @JsonProperty("advertised_features")
49  private List<String> advertisedFeatures;
50 
51  @JsonProperty("supported_features")
52  private List<String> supportedFeatures;
53 
54  @JsonProperty("peer_features")
55  private List<String> peerFeatures;
56 
57  @JsonProperty("curr_speed")
58  private String currSpeed;
59 
60  @JsonProperty("max_speed")
61  private String maxSpeed;
62 
63  @JsonCreator
64  public PortEntry(
65  @JsonProperty("port_number") String portNumber,
66  @JsonProperty("hardware_address") String hardwareAddress,
67  @JsonProperty("name") String name,
68  @JsonProperty("config") List<String> config,
69  @JsonProperty("state") List<String> state,
70  @JsonProperty("current_features") List<String> currentFeatures,
71  @JsonProperty("advertised_features") List<String> advertisedFeatures,
72  @JsonProperty("supported_features") List<String> supportedFeatures,
73  @JsonProperty("peer_features") List<String> peerFeatures,
74  @JsonProperty("curr_speed") String currSpeed,
75  @JsonProperty("max_speed") String maxSpeed) {
76  this.portNumber = portNumber;
77  this.hardwareAddress = hardwareAddress;
78  this.name = name;
79  this.config = config;
80  this.state = state;
81  this.currentFeatures = currentFeatures;
82  this.advertisedFeatures = advertisedFeatures;
83  this.supportedFeatures = supportedFeatures;
84  this.advertisedFeatures = advertisedFeatures;
85  this.peerFeatures = peerFeatures;
86  this.currSpeed = currSpeed;
87  this.maxSpeed = maxSpeed;
88  }
89 
90  public String getPortNumber() {
91  return portNumber;
92  }
93 
94  public String getHardwareAddress() {
95  return hardwareAddress;
96  }
97 
98  public String getName() {
99  return name;
100  }
101 
102  public List<String> getConfig() {
103  return config;
104  }
105 
106  public List<String> getState() {
107  return state;
108  }
109 
110  public List<String> getCurrentFeatures() {
111  return currentFeatures;
112  }
113 
114  public List<String> getAdvertisedFeatures() {
115  return advertisedFeatures;
116  }
117 
118  public List<String> getSupportedFeatures() {
119  return supportedFeatures;
120  }
121 
122  public List<String> getPeerFeatures() {
123  return peerFeatures;
124  }
125 
126  public String getCurrSpeed() {
127  return currSpeed;
128  }
129 
130  public String getMaxSpeed() {
131  return maxSpeed;
132  }
133 }
PortEntry( @JsonProperty("port_number") String portNumber, @JsonProperty("hardware_address") String hardwareAddress, @JsonProperty("name") String name, @JsonProperty("config") List< String > config, @JsonProperty("state") List< String > state, @JsonProperty("current_features") List< String > currentFeatures, @JsonProperty("advertised_features") List< String > advertisedFeatures, @JsonProperty("supported_features") List< String > supportedFeatures, @JsonProperty("peer_features") List< String > peerFeatures, @JsonProperty("curr_speed") String currSpeed, @JsonProperty("max_speed") String maxSpeed)
Definition: PortEntry.java:64
List< String > getCurrentFeatures()
Definition: PortEntry.java:110
List< String > getConfig()
Definition: PortEntry.java:102
String getName()
Definition: PortEntry.java:98
String getHardwareAddress()
Definition: PortEntry.java:94
name
Definition: setup.py:24
Definition: PortEntry.java:28
String getPortNumber()
Definition: PortEntry.java:90
String getCurrSpeed()
Definition: PortEntry.java:126
List< String > getState()
Definition: PortEntry.java:106
String getMaxSpeed()
Definition: PortEntry.java:130
List< String > getPeerFeatures()
Definition: PortEntry.java:122
List< String > getSupportedFeatures()
Definition: PortEntry.java:118
List< String > getAdvertisedFeatures()
Definition: PortEntry.java:114