Skip to content

Commit 0e8f58f

Browse files
committed
Initial commit (#291).
1 parent 6e608d1 commit 0e8f58f

File tree

1 file changed

+214
-0
lines changed

1 file changed

+214
-0
lines changed
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
package org.gitlab4j.api.models;
2+
3+
import javax.xml.bind.annotation.XmlAccessType;
4+
import javax.xml.bind.annotation.XmlAccessorType;
5+
import javax.xml.bind.annotation.XmlRootElement;
6+
7+
import org.gitlab4j.api.utils.JacksonJson;
8+
import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
9+
10+
import com.fasterxml.jackson.annotation.JsonCreator;
11+
import com.fasterxml.jackson.annotation.JsonValue;
12+
13+
@XmlRootElement
14+
@XmlAccessorType(XmlAccessType.FIELD)
15+
public class Position {
16+
17+
public static enum PositionType {
18+
19+
TEXT, IMAGE;
20+
private static JacksonJsonEnumHelper<PositionType> enumHelper = new JacksonJsonEnumHelper<>(PositionType.class,
21+
true, true);
22+
23+
@JsonCreator
24+
public static PositionType forValue(String value) {
25+
return enumHelper.forValue(value);
26+
}
27+
28+
@JsonValue
29+
public String toValue() {
30+
return (enumHelper.toString(this));
31+
}
32+
33+
@Override
34+
public String toString() {
35+
return (enumHelper.toString(this));
36+
}
37+
}
38+
39+
private String baseSha;
40+
private String startSha;
41+
private String headSha;
42+
private String oldPath;
43+
private String newPath;
44+
private PositionType positionType;
45+
46+
private Integer oldLine;
47+
private Integer newLine;
48+
49+
private Integer width;
50+
private Integer height;
51+
private Integer x;
52+
private Integer y;
53+
54+
public String getBaseSha() {
55+
return baseSha;
56+
}
57+
58+
public void setBaseSha(String baseSha) {
59+
this.baseSha = baseSha;
60+
}
61+
62+
public Position withBaseSha(String baseSha) {
63+
this.baseSha = baseSha;
64+
return (this);
65+
}
66+
67+
public String getStartSha() {
68+
return startSha;
69+
}
70+
71+
public void setStartSha(String startSha) {
72+
this.startSha = startSha;
73+
}
74+
75+
public Position withStartSha(String startSha) {
76+
this.startSha = startSha;
77+
return (this);
78+
}
79+
80+
public String getHeadSha() {
81+
return headSha;
82+
}
83+
84+
public void setHeadSha(String headSha) {
85+
this.headSha = headSha;
86+
}
87+
88+
public Position withHeadSha(String headSha) {
89+
this.headSha = headSha;
90+
return (this);
91+
}
92+
93+
public String getOldPath() {
94+
return oldPath;
95+
}
96+
97+
public void setOldPath(String oldPath) {
98+
this.oldPath = oldPath;
99+
}
100+
101+
public Position withOldPath(String oldPath) {
102+
this.oldPath = oldPath;
103+
return (this);
104+
}
105+
106+
public String getNewPath() {
107+
return newPath;
108+
}
109+
110+
public void setNewPath(String newPath) {
111+
this.newPath = newPath;
112+
}
113+
114+
public Position withNewPath(String newPath) {
115+
this.newPath = newPath;
116+
return (this);
117+
}
118+
119+
public PositionType getPositionType() {
120+
return positionType;
121+
}
122+
123+
public void setPositionType(PositionType positionType) {
124+
this.positionType = positionType;
125+
}
126+
127+
public Position withPositionType(PositionType positionType) {
128+
this.positionType = positionType;
129+
return (this);
130+
}
131+
132+
public Integer getOldLine() {
133+
return oldLine;
134+
}
135+
136+
public void setOldLine(Integer oldLine) {
137+
this.oldLine = oldLine;
138+
}
139+
140+
public Position withOldLine(Integer oldLine) {
141+
this.oldLine = oldLine;
142+
return (this);
143+
}
144+
145+
public Integer getNewLine() {
146+
return newLine;
147+
}
148+
149+
public void setNewLine(Integer newLine) {
150+
this.newLine = newLine;
151+
}
152+
153+
public Position withNewLine(Integer newLine) {
154+
this.newLine = newLine;
155+
return (this);
156+
}
157+
158+
public Integer getWidth() {
159+
return width;
160+
}
161+
162+
public void setWidth(Integer width) {
163+
this.width = width;
164+
}
165+
166+
public Position withWidth(Integer width) {
167+
this.width = width;
168+
return (this);
169+
}
170+
171+
public Integer getHeight() {
172+
return height;
173+
}
174+
175+
public void setHeight(Integer height) {
176+
this.height = height;
177+
}
178+
179+
public Position withHeight(Integer height) {
180+
this.height = height;
181+
return (this);
182+
}
183+
184+
public Integer getX() {
185+
return x;
186+
}
187+
188+
public void setX(Integer x) {
189+
this.x = x;
190+
}
191+
192+
public Position withX(Integer x) {
193+
this.x = x;
194+
return (this);
195+
}
196+
197+
public Integer getY() {
198+
return y;
199+
}
200+
201+
public void setY(Integer y) {
202+
this.y = y;
203+
}
204+
205+
public Position withY(Integer y) {
206+
this.y = y;
207+
return (this);
208+
}
209+
210+
@Override
211+
public String toString() {
212+
return (JacksonJson.toJsonString(this));
213+
}
214+
}

0 commit comments

Comments
 (0)