Open Kilda Java Documentation
FeatureTogglePayload.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;
17 
18 import com.fasterxml.jackson.annotation.JsonProperty;
19 import lombok.Data;
20 
21 @Data
22 public class FeatureTogglePayload {
23 
24  @JsonProperty("sync_rules")
25  private Boolean syncRulesEnabled;
26 
27  @JsonProperty("reflow_on_switch_activation")
28  private Boolean reflowOnSwitchActivationEnabled;
29 
30  @JsonProperty("create_flow")
31  private Boolean createFlowEnabled;
32 
33  @JsonProperty("update_flow")
34  private Boolean updateFlowEnabled;
35 
36  @JsonProperty("delete_flow")
37  private Boolean deleteFlowEnabled;
38 
39  @JsonProperty("push_flow")
40  private Boolean pushFlowEnabled;
41 
42  @JsonProperty("unpush_flow")
43  private Boolean unpushFlowEnabled;
44 
45  public FeatureTogglePayload(@JsonProperty("sync_rules") Boolean syncRulesEnabled,
46  @JsonProperty("reflow_on_switch_activation") Boolean reflowOnSwitchActivationEnabled,
47  @JsonProperty("create_flow") Boolean createFlowEnabled,
48  @JsonProperty("update_flow") Boolean updateFlowEnabled,
49  @JsonProperty("delete_flow") Boolean deleteFlowEnabled,
50  @JsonProperty("push_flow") Boolean pushFlowEnabled,
51  @JsonProperty("unpush_flow") Boolean unpushFlowEnabled) {
52  this.syncRulesEnabled = syncRulesEnabled;
53  this.reflowOnSwitchActivationEnabled = reflowOnSwitchActivationEnabled;
54  this.createFlowEnabled = createFlowEnabled;
55  this.updateFlowEnabled = updateFlowEnabled;
56  this.deleteFlowEnabled = deleteFlowEnabled;
57  this.pushFlowEnabled = pushFlowEnabled;
58  this.unpushFlowEnabled = unpushFlowEnabled;
59  }
60 
62  this.syncRulesEnabled = payload.syncRulesEnabled;
63  this.reflowOnSwitchActivationEnabled = payload.reflowOnSwitchActivationEnabled;
64  this.createFlowEnabled = payload.createFlowEnabled;
65  this.updateFlowEnabled = payload.updateFlowEnabled;
66  this.deleteFlowEnabled = payload.deleteFlowEnabled;
67  this.pushFlowEnabled = payload.pushFlowEnabled;
68  this.unpushFlowEnabled = payload.unpushFlowEnabled;
69  }
70 
71  @Override
72  public String toString() {
73  return "FeatureTogglePayload [syncRulesEnabled=" + syncRulesEnabled + ", reflowOnSwitchActivationEnabled="
74  + reflowOnSwitchActivationEnabled + ", createFlowEnabled=" + createFlowEnabled + ", updateFlowEnabled="
75  + updateFlowEnabled + ", deleteFlowEnabled=" + deleteFlowEnabled + ", pushFlowEnabled="
76  + pushFlowEnabled + ", unpushFlowEnabled=" + unpushFlowEnabled + "]";
77  }
78 
79 }
FeatureTogglePayload(@JsonProperty("sync_rules") Boolean syncRulesEnabled, @JsonProperty("reflow_on_switch_activation") Boolean reflowOnSwitchActivationEnabled, @JsonProperty("create_flow") Boolean createFlowEnabled, @JsonProperty("update_flow") Boolean updateFlowEnabled, @JsonProperty("delete_flow") Boolean deleteFlowEnabled, @JsonProperty("push_flow") Boolean pushFlowEnabled, @JsonProperty("unpush_flow") Boolean unpushFlowEnabled)