|
| 1 | + |
| 2 | +package com.baeldung.jaxb.gen; |
| 3 | + |
| 4 | +import java.io.Serializable; |
| 5 | +import java.util.Calendar; |
| 6 | +import javax.xml.bind.annotation.XmlAccessType; |
| 7 | +import javax.xml.bind.annotation.XmlAccessorType; |
| 8 | +import javax.xml.bind.annotation.XmlElement; |
| 9 | +import javax.xml.bind.annotation.XmlRootElement; |
| 10 | +import javax.xml.bind.annotation.XmlSchemaType; |
| 11 | +import javax.xml.bind.annotation.XmlType; |
| 12 | +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; |
| 13 | +import org.w3._2001.xmlschema.Adapter1; |
| 14 | + |
| 15 | + |
| 16 | +/** |
| 17 | + * <p>Java class for UserResponse complex type. |
| 18 | + * |
| 19 | + * <p>The following schema fragment specifies the expected content contained within this class. |
| 20 | + * |
| 21 | + * <pre> |
| 22 | + * <complexType name="UserResponse"> |
| 23 | + * <complexContent> |
| 24 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 25 | + * <sequence> |
| 26 | + * <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/> |
| 27 | + * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> |
| 28 | + * <element name="gender" type="{http://www.w3.org/2001/XMLSchema}string"/> |
| 29 | + * <element name="created" type="{http://www.w3.org/2001/XMLSchema}dateTime"/> |
| 30 | + * </sequence> |
| 31 | + * </restriction> |
| 32 | + * </complexContent> |
| 33 | + * </complexType> |
| 34 | + * </pre> |
| 35 | + * |
| 36 | + * |
| 37 | + */ |
| 38 | +@XmlAccessorType(XmlAccessType.FIELD) |
| 39 | +@XmlType(name = "UserResponse", propOrder = { |
| 40 | + "id", |
| 41 | + "name", |
| 42 | + "gender", |
| 43 | + "created" |
| 44 | +}) |
| 45 | +@XmlRootElement(name = "userResponse") |
| 46 | +public class UserResponse |
| 47 | + implements Serializable |
| 48 | +{ |
| 49 | + |
| 50 | + private final static long serialVersionUID = -1L; |
| 51 | + protected int id; |
| 52 | + @XmlElement(required = true) |
| 53 | + protected String name; |
| 54 | + @XmlElement(required = true) |
| 55 | + protected String gender; |
| 56 | + @XmlElement(required = true, type = String.class) |
| 57 | + @XmlJavaTypeAdapter(Adapter1 .class) |
| 58 | + @XmlSchemaType(name = "dateTime") |
| 59 | + protected Calendar created; |
| 60 | + |
| 61 | + /** |
| 62 | + * Gets the value of the id property. |
| 63 | + * |
| 64 | + */ |
| 65 | + public int getId() { |
| 66 | + return id; |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Sets the value of the id property. |
| 71 | + * |
| 72 | + */ |
| 73 | + public void setId(int value) { |
| 74 | + this.id = value; |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Gets the value of the name property. |
| 79 | + * |
| 80 | + * @return |
| 81 | + * possible object is |
| 82 | + * {@link String } |
| 83 | + * |
| 84 | + */ |
| 85 | + public String getName() { |
| 86 | + return name; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Sets the value of the name property. |
| 91 | + * |
| 92 | + * @param value |
| 93 | + * allowed object is |
| 94 | + * {@link String } |
| 95 | + * |
| 96 | + */ |
| 97 | + public void setName(String value) { |
| 98 | + this.name = value; |
| 99 | + } |
| 100 | + |
| 101 | + /** |
| 102 | + * Gets the value of the gender property. |
| 103 | + * |
| 104 | + * @return |
| 105 | + * possible object is |
| 106 | + * {@link String } |
| 107 | + * |
| 108 | + */ |
| 109 | + public String getGender() { |
| 110 | + return gender; |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Sets the value of the gender property. |
| 115 | + * |
| 116 | + * @param value |
| 117 | + * allowed object is |
| 118 | + * {@link String } |
| 119 | + * |
| 120 | + */ |
| 121 | + public void setGender(String value) { |
| 122 | + this.gender = value; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * Gets the value of the created property. |
| 127 | + * |
| 128 | + * @return |
| 129 | + * possible object is |
| 130 | + * {@link String } |
| 131 | + * |
| 132 | + */ |
| 133 | + public Calendar getCreated() { |
| 134 | + return created; |
| 135 | + } |
| 136 | + |
| 137 | + /** |
| 138 | + * Sets the value of the created property. |
| 139 | + * |
| 140 | + * @param value |
| 141 | + * allowed object is |
| 142 | + * {@link String } |
| 143 | + * |
| 144 | + */ |
| 145 | + public void setCreated(Calendar value) { |
| 146 | + this.created = value; |
| 147 | + } |
| 148 | + |
| 149 | +} |
0 commit comments