diff options
Diffstat (limited to 'src/main/java/com/p4square/ccbapi/model/Phone.java')
-rw-r--r-- | src/main/java/com/p4square/ccbapi/model/Phone.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/main/java/com/p4square/ccbapi/model/Phone.java b/src/main/java/com/p4square/ccbapi/model/Phone.java new file mode 100644 index 0000000..eb66eb1 --- /dev/null +++ b/src/main/java/com/p4square/ccbapi/model/Phone.java @@ -0,0 +1,41 @@ +package com.p4square.ccbapi.model; + +import javax.xml.bind.annotation.*; + +/** + * Phone Number and Type pair. + */ +@XmlRootElement(name="phone") +@XmlAccessorType(XmlAccessType.NONE) +public class Phone { + @XmlType(namespace="Phone") + public enum Type { + @XmlEnumValue("contact") CONTACT, + @XmlEnumValue("home") HOME, + @XmlEnumValue("work") WORK, + @XmlEnumValue("mobile") MOBILE, + @XmlEnumValue("emergency") EMERGENCY; + } + + @XmlAttribute(name="type") + private Type type; + + @XmlValue + private String number; + + public Type getType() { + return type; + } + + public void setType(Type type) { + this.type = type; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } +} |