Open Kilda Java Documentation
FlowsResponse.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.flow;
17 
18 import static com.google.common.base.MoreObjects.toStringHelper;
19 
21 
22 import com.fasterxml.jackson.annotation.JsonCreator;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
26 
27 import java.util.List;
28 import java.util.Objects;
29 
33 @JsonSerialize
34 @JsonInclude(JsonInclude.Include.NON_NULL)
35 public class FlowsResponse extends InfoData {
39  private static final long serialVersionUID = 1L;
40 
41  @JsonProperty("flowIds")
42  private List<String> flowIds;
43 
50  @JsonCreator
51  public FlowsResponse(@JsonProperty("flowIds") List<String> flowIds) {
52  this.flowIds = flowIds;
53  }
54 
55  public List<String> getFlowIds() {
56  return flowIds;
57  }
58 
62  @Override
63  public String toString() {
64  return toStringHelper(this)
65  .add("flowIds", flowIds)
66  .toString();
67  }
68 
72  @Override
73  public int hashCode() {
74  return Objects.hash(flowIds);
75  }
76 
80  @Override
81  public boolean equals(Object object) {
82  if (this == object) {
83  return true;
84  }
85  if (object == null || getClass() != object.getClass()) {
86  return false;
87  }
88 
89  FlowsResponse that = (FlowsResponse) object;
90  return Objects.equals(flowIds, that.getFlowIds());
91  }
92 }
FlowsResponse(@JsonProperty("flowIds") List< String > flowIds)