|
1 | | - |
2 | | -package com.baeldung.jaxb.gen; |
3 | | - |
4 | | -import java.io.Serializable; |
5 | | -import javax.xml.bind.annotation.XmlAccessType; |
6 | | -import javax.xml.bind.annotation.XmlAccessorType; |
7 | | -import javax.xml.bind.annotation.XmlElement; |
8 | | -import javax.xml.bind.annotation.XmlRootElement; |
9 | | -import javax.xml.bind.annotation.XmlType; |
10 | | - |
11 | | - |
12 | | -/** |
13 | | - * <p>Java class for UserRequest complex type. |
14 | | - * |
15 | | - * <p>The following schema fragment specifies the expected content contained within this class. |
16 | | - * |
17 | | - * <pre> |
18 | | - * <complexType name="UserRequest"> |
19 | | - * <complexContent> |
20 | | - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
21 | | - * <sequence> |
22 | | - * <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/> |
23 | | - * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> |
24 | | - * </sequence> |
25 | | - * </restriction> |
26 | | - * </complexContent> |
27 | | - * </complexType> |
28 | | - * </pre> |
29 | | - * |
30 | | - * |
31 | | - */ |
32 | | -@XmlAccessorType(XmlAccessType.FIELD) |
33 | | -@XmlType(name = "UserRequest", propOrder = { |
34 | | - "id", |
35 | | - "name" |
36 | | -}) |
37 | | -@XmlRootElement(name = "userRequest") |
38 | | -public class UserRequest |
39 | | - implements Serializable |
40 | | -{ |
41 | | - |
42 | | - private final static long serialVersionUID = -1L; |
43 | | - protected int id; |
44 | | - @XmlElement(required = true) |
45 | | - protected String name; |
46 | | - |
47 | | - /** |
48 | | - * Gets the value of the id property. |
49 | | - * |
50 | | - */ |
51 | | - public int getId() { |
52 | | - return id; |
53 | | - } |
54 | | - |
55 | | - /** |
56 | | - * Sets the value of the id property. |
57 | | - * |
58 | | - */ |
59 | | - public void setId(int value) { |
60 | | - this.id = value; |
61 | | - } |
62 | | - |
63 | | - /** |
64 | | - * Gets the value of the name property. |
65 | | - * |
66 | | - * @return |
67 | | - * possible object is |
68 | | - * {@link String } |
69 | | - * |
70 | | - */ |
71 | | - public String getName() { |
72 | | - return name; |
73 | | - } |
74 | | - |
75 | | - /** |
76 | | - * Sets the value of the name property. |
77 | | - * |
78 | | - * @param value |
79 | | - * allowed object is |
80 | | - * {@link String } |
81 | | - * |
82 | | - */ |
83 | | - public void setName(String value) { |
84 | | - this.name = value; |
85 | | - } |
86 | | - |
87 | | -} |
| 1 | + |
| 2 | +package com.baeldung.jaxb.gen; |
| 3 | + |
| 4 | +import java.io.Serializable; |
| 5 | +import javax.xml.bind.annotation.XmlAccessType; |
| 6 | +import javax.xml.bind.annotation.XmlAccessorType; |
| 7 | +import javax.xml.bind.annotation.XmlElement; |
| 8 | +import javax.xml.bind.annotation.XmlRootElement; |
| 9 | +import javax.xml.bind.annotation.XmlType; |
| 10 | + |
| 11 | + |
| 12 | +/** |
| 13 | + * <p>Java class for UserRequest complex type. |
| 14 | + * |
| 15 | + * <p>The following schema fragment specifies the expected content contained within this class. |
| 16 | + * |
| 17 | + * <pre> |
| 18 | + * <complexType name="UserRequest"> |
| 19 | + * <complexContent> |
| 20 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 21 | + * <sequence> |
| 22 | + * <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/> |
| 23 | + * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> |
| 24 | + * </sequence> |
| 25 | + * </restriction> |
| 26 | + * </complexContent> |
| 27 | + * </complexType> |
| 28 | + * </pre> |
| 29 | + * |
| 30 | + * |
| 31 | + */ |
| 32 | +@XmlAccessorType(XmlAccessType.FIELD) |
| 33 | +@XmlType(name = "UserRequest", propOrder = { |
| 34 | + "id", |
| 35 | + "name" |
| 36 | +}) |
| 37 | +@XmlRootElement(name = "userRequest") |
| 38 | +public class UserRequest |
| 39 | + implements Serializable |
| 40 | +{ |
| 41 | + |
| 42 | + private final static long serialVersionUID = -1L; |
| 43 | + protected int id; |
| 44 | + @XmlElement(required = true) |
| 45 | + protected String name; |
| 46 | + |
| 47 | + /** |
| 48 | + * Gets the value of the id property. |
| 49 | + * |
| 50 | + */ |
| 51 | + public int getId() { |
| 52 | + return id; |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Sets the value of the id property. |
| 57 | + * |
| 58 | + */ |
| 59 | + public void setId(int value) { |
| 60 | + this.id = value; |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Gets the value of the name property. |
| 65 | + * |
| 66 | + * @return |
| 67 | + * possible object is |
| 68 | + * {@link String } |
| 69 | + * |
| 70 | + */ |
| 71 | + public String getName() { |
| 72 | + return name; |
| 73 | + } |
| 74 | + |
| 75 | + /** |
| 76 | + * Sets the value of the name property. |
| 77 | + * |
| 78 | + * @param value |
| 79 | + * allowed object is |
| 80 | + * {@link String } |
| 81 | + * |
| 82 | + */ |
| 83 | + public void setName(String value) { |
| 84 | + this.name = value; |
| 85 | + } |
| 86 | + |
| 87 | +} |
0 commit comments