Open Kilda Java Documentation
FlowPathPayload.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.payload.flow;
17 
18 import com.fasterxml.jackson.annotation.JsonCreator;
19 import com.fasterxml.jackson.annotation.JsonProperty;
20 import lombok.Data;
21 import lombok.NoArgsConstructor;
22 
23 import java.io.Serializable;
24 import java.util.List;
25 
29 // TODO move into api module
30 @Data
31 @NoArgsConstructor
32 public class FlowPathPayload implements Serializable {
36  private static final long serialVersionUID = 1L;
37 
41  @JsonProperty("flowid")
42  protected String id;
43 
47  @JsonProperty("flowpath_forward")
48  protected List<PathNodePayload> forwardPath;
49 
53  @JsonProperty("flowpath_reverse")
54  protected List<PathNodePayload> reversePath;
55 
56  @JsonCreator
57  public FlowPathPayload(@JsonProperty("flowid") String id,
58  @JsonProperty("flowpath_forward") List<PathNodePayload> forwardPath,
59  @JsonProperty("flowpath_reverse") List<PathNodePayload> reversePath) {
60  this.id = id;
61  this.forwardPath = forwardPath;
62  this.reversePath = reversePath;
63  }
64 }