blob: c769811945e3268da6cd49e09039aee154beed63 [file] [log] [blame]
Toshio Koideb609b3b2014-02-14 18:25:52 -08001package net.onrc.onos.intent;
2
3/**
4 * @author Toshio Koide (t-koide@onlab.us)
5 */
6public class IntentOperation {
7 public enum Operator {
8 /**
9 * Add new intent specified by intent field
10 */
11 ADD,
12
13 /**
14 * Remove existing intent specified by intent field.
15 * The specified intent should be an instance of Intent class (not a child class)
16 */
17 REMOVE,
18 }
19
20 public IntentOperation() {}
21
22 public IntentOperation(Operator operator, Intent intent) {
23 this.operator = operator;
24 this.intent = intent;
25 }
26
27 public Operator operator;
28 public Intent intent;
Toshio Koide0c9106d2014-02-19 15:26:38 -080029
30 @Override
31 public String toString() {
32 return operator.toString() + ", (" + intent.toString() + ")";
33 }
Toshio Koideb609b3b2014-02-14 18:25:52 -080034}