Newer
Older
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
42
43
44
45
46
47
48
49
50
51
52
53
54
package OSM10NBIClient;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
public class ProjectEditRequestPayload {
String name;
Boolean admin;
List<Map<String, Integer>> quotas;
public List<Map<String, Integer>> getQuotas() {
return quotas;
}
public void setQuotas(List<Map<String, Integer>> quotas) {
this.quotas = quotas;
}
public Boolean getAdmin() {
return admin;
}
public void setAdmin(Boolean admin) {
this.admin = admin;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String toJSON()
{
String jsonInString=null;
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(Include.NON_NULL);
try {
jsonInString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(this);
} catch (JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return jsonInString;
}
}