summaryrefslogtreecommitdiff
path: root/src/main/java/com/p4square/ccbapi/model/Phone.java
blob: eb66eb1affa7ae8dd8778f439635a67ed64a36c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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;
    }
}