Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.util; |
| 2 | |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 3 | import org.codehaus.jackson.annotate.JsonProperty; |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 4 | |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 5 | /** |
| 6 | * The class representing a Caller ID for an ONOS component. |
| 7 | */ |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 8 | public class CallerId { |
| 9 | private String value; |
| 10 | |
| 11 | /** |
| 12 | * Default constructor. |
| 13 | */ |
| 14 | public CallerId() {} |
| 15 | |
| 16 | /** |
| 17 | * Constructor from a string value. |
| 18 | * |
| 19 | * @param value the value to use. |
| 20 | */ |
| 21 | public CallerId(String value) { |
| 22 | this.value = value; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Get the value of the Caller ID. |
| 27 | * |
| 28 | * @return the value of the Caller ID. |
| 29 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 30 | @JsonProperty("value") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 31 | public String value() { return value; } |
| 32 | |
| 33 | /** |
| 34 | * Set the value of the Caller ID. |
| 35 | * |
| 36 | * @param value the value to set. |
| 37 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 38 | @JsonProperty("value") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 39 | public void setValue(String value) { |
| 40 | this.value = value; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Convert the Caller ID value to a string. |
| 45 | * |
| 46 | * @return the Caller ID value to a string. |
| 47 | */ |
| 48 | @Override |
| 49 | public String toString() { |
| 50 | return value; |
| 51 | } |
| 52 | } |