Open Kilda Java Documentation
FlowIdStatusPayload.java
Go to the documentation of this file.
1 /* Copyright 2018 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 static org.openkilda.messaging.Utils.FLOW_ID;
19 
20 import com.fasterxml.jackson.annotation.JsonCreator;
21 import com.fasterxml.jackson.annotation.JsonProperty;
22 import lombok.Data;
23 import lombok.NoArgsConstructor;
24 
25 import java.io.Serializable;
26 
30 // TODO move into api module
31 @Data
32 @NoArgsConstructor
33 public class FlowIdStatusPayload implements Serializable {
34 
35  private static final long serialVersionUID = 1L;
36 
40  @JsonProperty(FLOW_ID)
41  private String id;
42 
46  @JsonProperty("status")
47  private FlowState status;
48 
55  @JsonCreator
56  public FlowIdStatusPayload(@JsonProperty(FLOW_ID) final String id,
57  @JsonProperty("status") final FlowState status) {
58  this.id = id;
59  this.status = status;
60  }
61 }
FlowIdStatusPayload(@JsonProperty(FLOW_ID) final String id, @JsonProperty("status") final FlowState status)
static final String FLOW_ID
Definition: Utils.java:61