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

box / box-java-sdk / #4742

06 Aug 2025 12:44PM UTC coverage: 38.272% (-0.08%) from 38.352%
#4742

push

github

web-flow
chore: Adjust `github` workflows for legacy repos (box/box-codegen#772) (#1331)

19031 of 49725 relevant lines covered (38.27%)

0.38 hits per line

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

2.25
/src/main/java/com/box/sdkgen/schemas/filefullorfolderfull/FileFullOrFolderFull.java
1
package com.box.sdkgen.schemas.filefullorfolderfull;
2

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

21
@JsonDeserialize(using = FileFullOrFolderFull.FileFullOrFolderFullDeserializer.class)
22
@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class)
23
public class FileFullOrFolderFull extends OneOfTwo<FileFull, FolderFull> {
24

25
  protected final List<String> tags;
26

27
  protected final Boolean isAccessibleViaSharedLink;
28

29
  protected final List<String> allowedInviteeRoles;
30

31
  protected final Boolean isExternallyOwned;
32

33
  protected final Boolean hasCollaborations;
34

35
  protected final Boolean isAssociatedWithAppItem;
36

37
  protected final String description;
38

39
  protected final Long size;
40

41
  protected final Date createdAt;
42

43
  protected final Date modifiedAt;
44

45
  protected final Date trashedAt;
46

47
  protected final Date purgedAt;
48

49
  protected final Date contentCreatedAt;
50

51
  protected final Date contentModifiedAt;
52

53
  protected final UserMini createdBy;
54

55
  protected final UserMini modifiedBy;
56

57
  protected final UserMini ownedBy;
58

59
  protected final FolderMini parent;
60

61
  protected final String itemStatus;
62

63
  protected final String sequenceId;
64

65
  protected final String name;
66

67
  protected final String id;
68

69
  protected final String etag;
70

71
  protected final String type;
72

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

101
  public FileFullOrFolderFull(FolderFull folderFull) {
102
    super(null, folderFull);
×
103
    this.tags = folderFull.getTags();
×
104
    this.isAccessibleViaSharedLink = folderFull.getIsAccessibleViaSharedLink();
×
105
    this.allowedInviteeRoles = EnumWrapper.convertToString(folderFull.getAllowedInviteeRoles());
×
106
    this.isExternallyOwned = folderFull.getIsExternallyOwned();
×
107
    this.hasCollaborations = folderFull.getHasCollaborations();
×
108
    this.isAssociatedWithAppItem = folderFull.getIsAssociatedWithAppItem();
×
109
    this.description = folderFull.getDescription();
×
110
    this.size = folderFull.getSize();
×
111
    this.createdAt = folderFull.getCreatedAt();
×
112
    this.modifiedAt = folderFull.getModifiedAt();
×
113
    this.trashedAt = folderFull.getTrashedAt();
×
114
    this.purgedAt = folderFull.getPurgedAt();
×
115
    this.contentCreatedAt = folderFull.getContentCreatedAt();
×
116
    this.contentModifiedAt = folderFull.getContentModifiedAt();
×
117
    this.createdBy = folderFull.getCreatedBy();
×
118
    this.modifiedBy = folderFull.getModifiedBy();
×
119
    this.ownedBy = folderFull.getOwnedBy();
×
120
    this.parent = folderFull.getParent();
×
121
    this.itemStatus = EnumWrapper.convertToString(folderFull.getItemStatus());
×
122
    this.sequenceId = folderFull.getSequenceId();
×
123
    this.name = folderFull.getName();
×
124
    this.id = folderFull.getId();
×
125
    this.etag = folderFull.getEtag();
×
126
    this.type = EnumWrapper.convertToString(folderFull.getType());
×
127
  }
×
128

129
  public boolean isFileFull() {
130
    return value0 != null;
×
131
  }
132

133
  public FileFull getFileFull() {
134
    return value0;
×
135
  }
136

137
  public boolean isFolderFull() {
138
    return value1 != null;
×
139
  }
140

141
  public FolderFull getFolderFull() {
142
    return value1;
×
143
  }
144

145
  public List<String> getTags() {
146
    return tags;
×
147
  }
148

149
  public boolean getIsAccessibleViaSharedLink() {
150
    return isAccessibleViaSharedLink;
×
151
  }
152

153
  public List<String> getAllowedInviteeRoles() {
154
    return allowedInviteeRoles;
×
155
  }
156

157
  public boolean getIsExternallyOwned() {
158
    return isExternallyOwned;
×
159
  }
160

161
  public boolean getHasCollaborations() {
162
    return hasCollaborations;
×
163
  }
164

165
  public boolean getIsAssociatedWithAppItem() {
166
    return isAssociatedWithAppItem;
×
167
  }
168

169
  public String getDescription() {
170
    return description;
×
171
  }
172

173
  public long getSize() {
174
    return size;
×
175
  }
176

177
  public Date getCreatedAt() {
178
    return createdAt;
×
179
  }
180

181
  public Date getModifiedAt() {
182
    return modifiedAt;
×
183
  }
184

185
  public Date getTrashedAt() {
186
    return trashedAt;
×
187
  }
188

189
  public Date getPurgedAt() {
190
    return purgedAt;
×
191
  }
192

193
  public Date getContentCreatedAt() {
194
    return contentCreatedAt;
×
195
  }
196

197
  public Date getContentModifiedAt() {
198
    return contentModifiedAt;
×
199
  }
200

201
  public UserMini getCreatedBy() {
202
    return createdBy;
×
203
  }
204

205
  public UserMini getModifiedBy() {
206
    return modifiedBy;
×
207
  }
208

209
  public UserMini getOwnedBy() {
210
    return ownedBy;
×
211
  }
212

213
  public FolderMini getParent() {
214
    return parent;
×
215
  }
216

217
  public String getItemStatus() {
218
    return itemStatus;
×
219
  }
220

221
  public String getSequenceId() {
222
    return sequenceId;
×
223
  }
224

225
  public String getName() {
226
    return name;
×
227
  }
228

229
  public String getId() {
230
    return id;
×
231
  }
232

233
  public String getEtag() {
234
    return etag;
×
235
  }
236

237
  public String getType() {
238
    return type;
×
239
  }
240

241
  static class FileFullOrFolderFullDeserializer extends JsonDeserializer<FileFullOrFolderFull> {
242

243
    public FileFullOrFolderFullDeserializer() {
244
      super();
1✔
245
    }
1✔
246

247
    @Override
248
    public FileFullOrFolderFull deserialize(JsonParser jp, DeserializationContext ctxt)
249
        throws IOException {
250
      JsonNode node = JsonManager.jsonToSerializedData(jp);
×
251
      JsonNode discriminant0 = node.get("type");
×
252
      if (!(discriminant0 == null)) {
×
253
        switch (discriminant0.asText()) {
×
254
          case "file":
255
            return new FileFullOrFolderFull(JsonManager.deserialize(node, FileFull.class));
×
256
          case "folder":
257
            return new FileFullOrFolderFull(JsonManager.deserialize(node, FolderFull.class));
×
258
        }
259
      }
260
      throw new JsonMappingException(jp, "Unable to deserialize FileFullOrFolderFull");
×
261
    }
262
  }
263
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc