-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsonSchema.java
More file actions
379 lines (304 loc) · 10.6 KB
/
JsonSchema.java
File metadata and controls
379 lines (304 loc) · 10.6 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
/*
* DocSpring API
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.docspring;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.docspring.JSON;
/**
* JsonSchema
*/
@JsonPropertyOrder({
JsonSchema.JSON_PROPERTY_$_SCHEMA,
JsonSchema.JSON_PROPERTY_ID,
JsonSchema.JSON_PROPERTY_TITLE,
JsonSchema.JSON_PROPERTY_DESCRIPTION,
JsonSchema.JSON_PROPERTY_DEFINITIONS,
JsonSchema.JSON_PROPERTY_TYPE,
JsonSchema.JSON_PROPERTY_PROPERTIES,
JsonSchema.JSON_PROPERTY_ADDITIONAL_PROPERTIES,
JsonSchema.JSON_PROPERTY_REQUIRED
})
@JsonTypeName("json_schema")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0-DOCSPRING")
public class JsonSchema {
public static final String JSON_PROPERTY_$_SCHEMA = "$schema";
@javax.annotation.Nullable
private URI $schema;
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
private String id;
public static final String JSON_PROPERTY_TITLE = "title";
@javax.annotation.Nullable
private String title;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
@javax.annotation.Nullable
private String description;
public static final String JSON_PROPERTY_DEFINITIONS = "definitions";
@javax.annotation.Nullable
private Object definitions;
public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nullable
private String type;
public static final String JSON_PROPERTY_PROPERTIES = "properties";
@javax.annotation.Nullable
private Object properties;
public static final String JSON_PROPERTY_ADDITIONAL_PROPERTIES = "additionalProperties";
@javax.annotation.Nullable
private Boolean additionalProperties;
public static final String JSON_PROPERTY_REQUIRED = "required";
@javax.annotation.Nullable
private List<String> required = new ArrayList<>();
public JsonSchema() {
}
public JsonSchema $schema(@javax.annotation.Nullable URI $schema) {
this.$schema = $schema;
return this;
}
/**
* Get $schema
* @return $schema
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_$_SCHEMA, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public URI get$Schema() {
return $schema;
}
@JsonProperty(value = JSON_PROPERTY_$_SCHEMA, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void set$Schema(@javax.annotation.Nullable URI $schema) {
this.$schema = $schema;
}
public JsonSchema id(@javax.annotation.Nullable String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(@javax.annotation.Nullable String id) {
this.id = id;
}
public JsonSchema title(@javax.annotation.Nullable String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_TITLE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTitle() {
return title;
}
@JsonProperty(value = JSON_PROPERTY_TITLE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTitle(@javax.annotation.Nullable String title) {
this.title = title;
}
public JsonSchema description(@javax.annotation.Nullable String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_DESCRIPTION, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(value = JSON_PROPERTY_DESCRIPTION, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(@javax.annotation.Nullable String description) {
this.description = description;
}
public JsonSchema definitions(@javax.annotation.Nullable Object definitions) {
this.definitions = definitions;
return this;
}
/**
* Get definitions
* @return definitions
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_DEFINITIONS, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getDefinitions() {
return definitions;
}
@JsonProperty(value = JSON_PROPERTY_DEFINITIONS, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDefinitions(@javax.annotation.Nullable Object definitions) {
this.definitions = definitions;
}
public JsonSchema type(@javax.annotation.Nullable String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_TYPE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getType() {
return type;
}
@JsonProperty(value = JSON_PROPERTY_TYPE, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(@javax.annotation.Nullable String type) {
this.type = type;
}
public JsonSchema properties(@javax.annotation.Nullable Object properties) {
this.properties = properties;
return this;
}
/**
* Get properties
* @return properties
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_PROPERTIES, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getProperties() {
return properties;
}
@JsonProperty(value = JSON_PROPERTY_PROPERTIES, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProperties(@javax.annotation.Nullable Object properties) {
this.properties = properties;
}
public JsonSchema additionalProperties(@javax.annotation.Nullable Boolean additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}
/**
* Get additionalProperties
* @return additionalProperties
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_ADDITIONAL_PROPERTIES, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getAdditionalProperties() {
return additionalProperties;
}
@JsonProperty(value = JSON_PROPERTY_ADDITIONAL_PROPERTIES, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdditionalProperties(@javax.annotation.Nullable Boolean additionalProperties) {
this.additionalProperties = additionalProperties;
}
public JsonSchema required(@javax.annotation.Nullable List<String> required) {
this.required = required;
return this;
}
public JsonSchema addRequiredItem(String requiredItem) {
if (this.required == null) {
this.required = new ArrayList<>();
}
this.required.add(requiredItem);
return this;
}
/**
* Get required
* @return required
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_REQUIRED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getRequired() {
return required;
}
@JsonProperty(value = JSON_PROPERTY_REQUIRED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequired(@javax.annotation.Nullable List<String> required) {
this.required = required;
}
/**
* Return true if this json_schema object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JsonSchema jsonSchema = (JsonSchema) o;
return Objects.equals(this.$schema, jsonSchema.$schema) &&
Objects.equals(this.id, jsonSchema.id) &&
Objects.equals(this.title, jsonSchema.title) &&
Objects.equals(this.description, jsonSchema.description) &&
Objects.equals(this.definitions, jsonSchema.definitions) &&
Objects.equals(this.type, jsonSchema.type) &&
Objects.equals(this.properties, jsonSchema.properties) &&
Objects.equals(this.additionalProperties, jsonSchema.additionalProperties) &&
Objects.equals(this.required, jsonSchema.required);
}
@Override
public int hashCode() {
return Objects.hash($schema, id, title, description, definitions, type, properties, additionalProperties, required);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JsonSchema {\n");
sb.append(" $schema: ").append(toIndentedString($schema)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" definitions: ").append(toIndentedString(definitions)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append(" required: ").append(toIndentedString(required)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}