1
1
/** RSpace Inventory API Access your RSpace Inventory programmatically. */
2
2
package com .researchspace .api .v1 .model ;
3
3
4
- import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
5
4
import com .fasterxml .jackson .annotation .JsonProperty ;
5
+ import com .fasterxml .jackson .annotation .JsonProperty .Access ;
6
6
import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
7
7
import com .researchspace .model .inventory .Sample ;
8
8
import com .researchspace .model .inventory .SubSample ;
58
58
"fields" ,
59
59
"extraFields" ,
60
60
"subSamples" ,
61
- "subSamplesIntoContainer " ,
61
+ "subSamplesInContainer " ,
62
62
"_links"
63
63
})
64
- @ JsonIgnoreProperties (ignoreUnknown = true )
65
64
public class ApiSample extends ApiSampleWithoutSubSamples {
66
65
67
66
@ JsonProperty ("subSamples" )
68
67
private List <ApiSubSampleInfo > subSamples = new LinkedList <>();
69
68
70
- @ JsonProperty ("subSamplesIntoContainer" )
71
- private List <ApiSubSampleInfo > subSamplesIntoContainer = new LinkedList <>();
69
+ @ JsonProperty (value = "subSamplesInContainer" , access = Access . READ_ONLY )
70
+ private List <ApiSubSampleInfo > subSamplesInContainer = new LinkedList <>();
72
71
73
- /* this will be `true` only when `subSamplesIntoContainer ` is null or empty */
74
- @ JsonProperty ("canBeDeleted" )
72
+ /* this will be `true` only when `subSamplesInContainer ` is null or empty */
73
+ @ JsonProperty (value = "canBeDeleted" , access = Access . READ_ONLY )
75
74
private Boolean canBeDeleted ;
76
75
77
76
public ApiSample (Sample sample ) {
@@ -81,10 +80,10 @@ public ApiSample(Sample sample) {
81
80
ApiSubSampleInfo subSampInfo = new ApiSubSampleInfo (subSample );
82
81
this .subSamples .add (subSampInfo );
83
82
if (subSample .isStoredInContainer ()) {
84
- this .subSamplesIntoContainer .add (subSampInfo );
83
+ this .subSamplesInContainer .add (subSampInfo );
85
84
}
86
85
}
87
- this .canBeDeleted = this .subSamplesIntoContainer .isEmpty ();
86
+ this .canBeDeleted = this .subSamplesInContainer .isEmpty ();
88
87
}
89
88
90
89
@ Override
0 commit comments