• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #7460

03 Aug 2026 08:17AM UTC coverage: 34.727% (-0.2%) from 34.932%
#7460

push

github

web-flow
feat: add `is_collaborated_content_available_when_owner_inactive` property (box/box-openapi#613) (#1946)

Co-authored-by: box-sdk-build <box-sdk-build@box.com>

2 of 10 new or added lines in 2 files covered. (20.0%)

655 existing lines in 14 files now uncovered.

19663 of 56622 relevant lines covered (34.73%)

0.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

2.06
/src/main/java/com/box/sdkgen/schemas/metadataqueryresultitem/MetadataQueryResultItem.java
1
package com.box.sdkgen.schemas.metadataqueryresultitem;
2

3
import com.box.sdkgen.internal.OneOfTwo;
4
import com.box.sdkgen.schemas.collection.Collection;
5
import com.box.sdkgen.schemas.filefull.FileFull;
6
import com.box.sdkgen.schemas.folderfull.FolderFull;
7
import com.box.sdkgen.schemas.foldermini.FolderMini;
8
import com.box.sdkgen.schemas.usermini.UserMini;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.box.sdkgen.serialization.json.JsonManager;
11
import com.fasterxml.jackson.core.JsonParser;
12
import com.fasterxml.jackson.databind.DeserializationContext;
13
import com.fasterxml.jackson.databind.JsonDeserializer;
14
import com.fasterxml.jackson.databind.JsonMappingException;
15
import com.fasterxml.jackson.databind.JsonNode;
16
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
17
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
18
import java.io.IOException;
19
import java.time.OffsetDateTime;
20
import java.util.List;
21

22
@JsonDeserialize(using = MetadataQueryResultItem.MetadataQueryResultItemDeserializer.class)
23
@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class)
24
public class MetadataQueryResultItem extends OneOfTwo<FileFull, FolderFull> {
25

26
  protected final List<String> tags;
27

28
  protected final Boolean isAccessibleViaSharedLink;
29

30
  protected final List<String> allowedInviteeRoles;
31

32
  protected final Boolean isExternallyOwned;
33

34
  protected final Boolean hasCollaborations;
35

36
  protected final Boolean isAssociatedWithAppItem;
37

38
  protected final List<Collection> collections;
39

40
  protected final List<String> allowedSharedLinkAccessLevels;
41

42
  protected final String description;
43

44
  protected final Long size;
45

46
  protected final OffsetDateTime createdAt;
47

48
  protected final OffsetDateTime modifiedAt;
49

50
  protected final OffsetDateTime trashedAt;
51

52
  protected final OffsetDateTime purgedAt;
53

54
  protected final OffsetDateTime contentCreatedAt;
55

56
  protected final OffsetDateTime contentModifiedAt;
57

58
  protected final UserMini createdBy;
59

60
  protected final UserMini modifiedBy;
61

62
  protected final UserMini ownedBy;
63

64
  protected final FolderMini parent;
65

66
  protected final String itemStatus;
67

68
  protected final String sequenceId;
69

70
  protected final String name;
71

72
  protected final String id;
73

74
  protected final String etag;
75

76
  protected final String type;
77

78
  public MetadataQueryResultItem(FileFull fileFull) {
79
    super(fileFull, null);
×
80
    this.tags = fileFull.getTags();
×
81
    this.isAccessibleViaSharedLink = fileFull.getIsAccessibleViaSharedLink();
×
82
    this.allowedInviteeRoles = EnumWrapper.convertToString(fileFull.getAllowedInviteeRoles());
×
83
    this.isExternallyOwned = fileFull.getIsExternallyOwned();
×
84
    this.hasCollaborations = fileFull.getHasCollaborations();
×
85
    this.isAssociatedWithAppItem = fileFull.getIsAssociatedWithAppItem();
×
86
    this.collections = fileFull.getCollections();
×
87
    this.allowedSharedLinkAccessLevels =
×
88
        EnumWrapper.convertToString(fileFull.getAllowedSharedLinkAccessLevels());
×
89
    this.description = fileFull.getDescription();
×
90
    this.size = fileFull.getSize();
×
91
    this.createdAt = fileFull.getCreatedAt();
×
92
    this.modifiedAt = fileFull.getModifiedAt();
×
93
    this.trashedAt = fileFull.getTrashedAt();
×
94
    this.purgedAt = fileFull.getPurgedAt();
×
95
    this.contentCreatedAt = fileFull.getContentCreatedAt();
×
96
    this.contentModifiedAt = fileFull.getContentModifiedAt();
×
97
    this.createdBy = fileFull.getCreatedBy();
×
98
    this.modifiedBy = fileFull.getModifiedBy();
×
99
    this.ownedBy = fileFull.getOwnedBy();
×
UNCOV
100
    this.parent = fileFull.getParent();
×
UNCOV
101
    this.itemStatus = EnumWrapper.convertToString(fileFull.getItemStatus());
×
102
    this.sequenceId = fileFull.getSequenceId();
×
103
    this.name = fileFull.getName();
×
104
    this.id = fileFull.getId();
×
105
    this.etag = fileFull.getEtag();
×
106
    this.type = EnumWrapper.convertToString(fileFull.getType());
×
107
  }
×
108

109
  public MetadataQueryResultItem(FolderFull folderFull) {
110
    super(null, folderFull);
×
111
    this.tags = folderFull.getTags();
×
112
    this.isAccessibleViaSharedLink = folderFull.getIsAccessibleViaSharedLink();
×
113
    this.allowedInviteeRoles = EnumWrapper.convertToString(folderFull.getAllowedInviteeRoles());
×
114
    this.isExternallyOwned = folderFull.getIsExternallyOwned();
×
115
    this.hasCollaborations = folderFull.getHasCollaborations();
×
116
    this.isAssociatedWithAppItem = folderFull.getIsAssociatedWithAppItem();
×
117
    this.collections = folderFull.getCollections();
×
118
    this.allowedSharedLinkAccessLevels =
×
119
        EnumWrapper.convertToString(folderFull.getAllowedSharedLinkAccessLevels());
×
120
    this.description = folderFull.getDescription();
×
121
    this.size = folderFull.getSize();
×
122
    this.createdAt = folderFull.getCreatedAt();
×
123
    this.modifiedAt = folderFull.getModifiedAt();
×
124
    this.trashedAt = folderFull.getTrashedAt();
×
125
    this.purgedAt = folderFull.getPurgedAt();
×
126
    this.contentCreatedAt = folderFull.getContentCreatedAt();
×
127
    this.contentModifiedAt = folderFull.getContentModifiedAt();
×
UNCOV
128
    this.createdBy = folderFull.getCreatedBy();
×
UNCOV
129
    this.modifiedBy = folderFull.getModifiedBy();
×
130
    this.ownedBy = folderFull.getOwnedBy();
×
UNCOV
131
    this.parent = folderFull.getParent();
×
UNCOV
132
    this.itemStatus = EnumWrapper.convertToString(folderFull.getItemStatus());
×
UNCOV
133
    this.sequenceId = folderFull.getSequenceId();
×
134
    this.name = folderFull.getName();
×
UNCOV
135
    this.id = folderFull.getId();
×
UNCOV
136
    this.etag = folderFull.getEtag();
×
UNCOV
137
    this.type = EnumWrapper.convertToString(folderFull.getType());
×
138
  }
×
139

140
  public boolean isFileFull() {
UNCOV
141
    return value0 != null;
×
142
  }
143

144
  public FileFull getFileFull() {
UNCOV
145
    return value0;
×
146
  }
147

148
  public boolean isFolderFull() {
UNCOV
149
    return value1 != null;
×
150
  }
151

152
  public FolderFull getFolderFull() {
UNCOV
153
    return value1;
×
154
  }
155

156
  public List<String> getTags() {
UNCOV
157
    return tags;
×
158
  }
159

160
  public boolean getIsAccessibleViaSharedLink() {
UNCOV
161
    return isAccessibleViaSharedLink;
×
162
  }
163

164
  public List<String> getAllowedInviteeRoles() {
UNCOV
165
    return allowedInviteeRoles;
×
166
  }
167

168
  public boolean getIsExternallyOwned() {
UNCOV
169
    return isExternallyOwned;
×
170
  }
171

172
  public boolean getHasCollaborations() {
UNCOV
173
    return hasCollaborations;
×
174
  }
175

176
  public boolean getIsAssociatedWithAppItem() {
UNCOV
177
    return isAssociatedWithAppItem;
×
178
  }
179

180
  public List<Collection> getCollections() {
UNCOV
181
    return collections;
×
182
  }
183

184
  public List<String> getAllowedSharedLinkAccessLevels() {
UNCOV
185
    return allowedSharedLinkAccessLevels;
×
186
  }
187

188
  public String getDescription() {
UNCOV
189
    return description;
×
190
  }
191

192
  public long getSize() {
UNCOV
193
    return size;
×
194
  }
195

196
  public OffsetDateTime getCreatedAt() {
UNCOV
197
    return createdAt;
×
198
  }
199

200
  public OffsetDateTime getModifiedAt() {
UNCOV
201
    return modifiedAt;
×
202
  }
203

204
  public OffsetDateTime getTrashedAt() {
UNCOV
205
    return trashedAt;
×
206
  }
207

208
  public OffsetDateTime getPurgedAt() {
UNCOV
209
    return purgedAt;
×
210
  }
211

212
  public OffsetDateTime getContentCreatedAt() {
UNCOV
213
    return contentCreatedAt;
×
214
  }
215

216
  public OffsetDateTime getContentModifiedAt() {
UNCOV
217
    return contentModifiedAt;
×
218
  }
219

220
  public UserMini getCreatedBy() {
UNCOV
221
    return createdBy;
×
222
  }
223

224
  public UserMini getModifiedBy() {
UNCOV
225
    return modifiedBy;
×
226
  }
227

228
  public UserMini getOwnedBy() {
UNCOV
229
    return ownedBy;
×
230
  }
231

232
  public FolderMini getParent() {
UNCOV
233
    return parent;
×
234
  }
235

236
  public String getItemStatus() {
UNCOV
237
    return itemStatus;
×
238
  }
239

240
  public String getSequenceId() {
UNCOV
241
    return sequenceId;
×
242
  }
243

244
  public String getName() {
UNCOV
245
    return name;
×
246
  }
247

248
  public String getId() {
UNCOV
249
    return id;
×
250
  }
251

252
  public String getEtag() {
253
    return etag;
×
254
  }
255

256
  public String getType() {
UNCOV
257
    return type;
×
258
  }
259

260
  static class MetadataQueryResultItemDeserializer
261
      extends JsonDeserializer<MetadataQueryResultItem> {
262

263
    public MetadataQueryResultItemDeserializer() {
264
      super();
1✔
265
    }
1✔
266

267
    @Override
268
    public MetadataQueryResultItem deserialize(JsonParser jp, DeserializationContext ctxt)
269
        throws IOException {
UNCOV
270
      JsonNode node = JsonManager.jsonToSerializedData(jp);
×
UNCOV
271
      JsonNode discriminant0 = node.get("type");
×
UNCOV
272
      if (!(discriminant0 == null)) {
×
UNCOV
273
        switch (discriminant0.asText()) {
×
274
          case "file":
UNCOV
275
            return new MetadataQueryResultItem(JsonManager.deserialize(node, FileFull.class));
×
276
          case "folder":
UNCOV
277
            return new MetadataQueryResultItem(JsonManager.deserialize(node, FolderFull.class));
×
278
        }
279
      }
UNCOV
280
      throw new JsonMappingException(jp, "Unable to deserialize MetadataQueryResultItem");
×
281
    }
282
  }
283
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc