Open Kilda Java Documentation
SwitchPortStatusData.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.JsonCreator;
22 import com.fasterxml.jackson.annotation.JsonProperty;
23 import lombok.Builder;
24 import lombok.Value;
25 
26 import java.util.Set;
27 
28 @Value
29 @Builder
30 public class SwitchPortStatusData extends InfoData {
31 
32  @JsonProperty("switch_id")
33  private SwitchId switchId;
34 
35  @JsonProperty("ports")
36  private Set<PortStatus> ports;
37 
38  @JsonProperty("requester")
39  private String requester;
40 
41 
42  @JsonCreator
44  @JsonProperty("switch_id") SwitchId switchId,
45  @JsonProperty("ports") Set<PortStatus> ports,
46  @JsonProperty("requester") String requester) {
47  this.switchId = switchId;
48  this.ports = ports;
49  this.requester = requester;
50  }
51 }
SwitchPortStatusData( @JsonProperty("switch_id") SwitchId switchId, @JsonProperty("ports") Set< PortStatus > ports, @JsonProperty("requester") String requester)