001package com.box.sdkgen.schemas.folderfull;
002
003import com.box.sdkgen.schemas.collection.Collection;
004import com.box.sdkgen.schemas.folder.Folder;
005import com.box.sdkgen.schemas.folder.FolderFolderUploadEmailField;
006import com.box.sdkgen.schemas.folder.FolderItemStatusField;
007import com.box.sdkgen.schemas.folder.FolderPathCollectionField;
008import com.box.sdkgen.schemas.folder.FolderSharedLinkField;
009import com.box.sdkgen.schemas.folderbase.FolderBaseTypeField;
010import com.box.sdkgen.schemas.foldermini.FolderMini;
011import com.box.sdkgen.schemas.items.Items;
012import com.box.sdkgen.schemas.usermini.UserMini;
013import com.box.sdkgen.serialization.json.EnumWrapper;
014import com.box.sdkgen.serialization.json.Valuable;
015import com.fasterxml.jackson.annotation.JsonFilter;
016import com.fasterxml.jackson.annotation.JsonProperty;
017import com.fasterxml.jackson.core.JsonGenerator;
018import com.fasterxml.jackson.core.JsonParser;
019import com.fasterxml.jackson.databind.DeserializationContext;
020import com.fasterxml.jackson.databind.JsonDeserializer;
021import com.fasterxml.jackson.databind.JsonNode;
022import com.fasterxml.jackson.databind.JsonSerializer;
023import com.fasterxml.jackson.databind.SerializerProvider;
024import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
025import com.fasterxml.jackson.databind.annotation.JsonSerialize;
026import java.io.IOException;
027import java.time.OffsetDateTime;
028import java.util.ArrayList;
029import java.util.List;
030import java.util.Objects;
031
032/**
033 * A full representation of a folder, as can be returned from any folder API endpoints by default.
034 */
035@JsonFilter("nullablePropertyFilter")
036public class FolderFull extends Folder {
037
038  @JsonDeserialize(using = FolderFullSyncStateField.FolderFullSyncStateFieldDeserializer.class)
039  @JsonSerialize(using = FolderFullSyncStateField.FolderFullSyncStateFieldSerializer.class)
040  @JsonProperty("sync_state")
041  protected EnumWrapper<FolderFullSyncStateField> syncState;
042
043  /** Specifies if this folder has any other collaborators. */
044  @JsonProperty("has_collaborations")
045  protected Boolean hasCollaborations;
046
047  protected FolderFullPermissionsField permissions;
048
049  protected List<String> tags;
050
051  @JsonProperty("can_non_owners_invite")
052  protected Boolean canNonOwnersInvite;
053
054  /** Specifies if this folder is owned by a user outside of the authenticated enterprise. */
055  @JsonProperty("is_externally_owned")
056  protected Boolean isExternallyOwned;
057
058  protected FolderFullMetadataField metadata;
059
060  @JsonProperty("is_collaboration_restricted_to_enterprise")
061  protected Boolean isCollaborationRestrictedToEnterprise;
062
063  /**
064   * The shared link access levels the authenticated user is allowed to use when creating or
065   * updating a shared link for this folder.
066   *
067   * <p>The list depends on item policy and user authorization. For some folders, like the root
068   * folder, this is always empty as sharing is not allowed at that level.
069   */
070  @JsonDeserialize(using = AllowedSharedLinkAccessLevelsDeserializer.class)
071  @JsonSerialize(using = AllowedSharedLinkAccessLevelsSerializer.class)
072  @JsonProperty("allowed_shared_link_access_levels")
073  protected List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>
074      allowedSharedLinkAccessLevels;
075
076  /** A list of the types of roles that user can be invited at when sharing this folder. */
077  @JsonDeserialize(using = AllowedInviteeRolesDeserializer.class)
078  @JsonSerialize(using = AllowedInviteeRolesSerializer.class)
079  @JsonProperty("allowed_invitee_roles")
080  protected List<EnumWrapper<FolderFullAllowedInviteeRolesField>> allowedInviteeRoles;
081
082  @JsonProperty("watermark_info")
083  protected FolderFullWatermarkInfoField watermarkInfo;
084
085  /**
086   * Specifies if the folder can be accessed with the direct shared link or a shared link to a
087   * parent folder.
088   */
089  @JsonProperty("is_accessible_via_shared_link")
090  protected Boolean isAccessibleViaSharedLink;
091
092  /**
093   * Specifies if collaborators who are not owners of this folder are restricted from viewing other
094   * collaborations on this folder.
095   *
096   * <p>It also restricts non-owners from inviting new collaborators.
097   */
098  @JsonProperty("can_non_owners_view_collaborators")
099  protected Boolean canNonOwnersViewCollaborators;
100
101  protected FolderFullClassificationField classification;
102
103  /**
104   * This field will return true if the folder or any ancestor of the folder is associated with at
105   * least one app item. Note that this will return true even if the context user does not have
106   * access to the app item(s) associated with the folder.
107   */
108  @JsonProperty("is_associated_with_app_item")
109  protected Boolean isAssociatedWithAppItem;
110
111  /**
112   * The collections that this folder belongs to.
113   *
114   * <p>For more information, see the [collections
115   * guide](https://developer.box.com/guides/collections).
116   */
117  protected List<Collection> collections;
118
119  public FolderFull(@JsonProperty("id") String id) {
120    super(id);
121  }
122
123  protected FolderFull(Builder builder) {
124    super(builder);
125    this.syncState = builder.syncState;
126    this.hasCollaborations = builder.hasCollaborations;
127    this.permissions = builder.permissions;
128    this.tags = builder.tags;
129    this.canNonOwnersInvite = builder.canNonOwnersInvite;
130    this.isExternallyOwned = builder.isExternallyOwned;
131    this.metadata = builder.metadata;
132    this.isCollaborationRestrictedToEnterprise = builder.isCollaborationRestrictedToEnterprise;
133    this.allowedSharedLinkAccessLevels = builder.allowedSharedLinkAccessLevels;
134    this.allowedInviteeRoles = builder.allowedInviteeRoles;
135    this.watermarkInfo = builder.watermarkInfo;
136    this.isAccessibleViaSharedLink = builder.isAccessibleViaSharedLink;
137    this.canNonOwnersViewCollaborators = builder.canNonOwnersViewCollaborators;
138    this.classification = builder.classification;
139    this.isAssociatedWithAppItem = builder.isAssociatedWithAppItem;
140    this.collections = builder.collections;
141    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
142  }
143
144  public EnumWrapper<FolderFullSyncStateField> getSyncState() {
145    return syncState;
146  }
147
148  public Boolean getHasCollaborations() {
149    return hasCollaborations;
150  }
151
152  public FolderFullPermissionsField getPermissions() {
153    return permissions;
154  }
155
156  public List<String> getTags() {
157    return tags;
158  }
159
160  public Boolean getCanNonOwnersInvite() {
161    return canNonOwnersInvite;
162  }
163
164  public Boolean getIsExternallyOwned() {
165    return isExternallyOwned;
166  }
167
168  public FolderFullMetadataField getMetadata() {
169    return metadata;
170  }
171
172  public Boolean getIsCollaborationRestrictedToEnterprise() {
173    return isCollaborationRestrictedToEnterprise;
174  }
175
176  public List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>
177      getAllowedSharedLinkAccessLevels() {
178    return allowedSharedLinkAccessLevels;
179  }
180
181  public List<EnumWrapper<FolderFullAllowedInviteeRolesField>> getAllowedInviteeRoles() {
182    return allowedInviteeRoles;
183  }
184
185  public FolderFullWatermarkInfoField getWatermarkInfo() {
186    return watermarkInfo;
187  }
188
189  public Boolean getIsAccessibleViaSharedLink() {
190    return isAccessibleViaSharedLink;
191  }
192
193  public Boolean getCanNonOwnersViewCollaborators() {
194    return canNonOwnersViewCollaborators;
195  }
196
197  public FolderFullClassificationField getClassification() {
198    return classification;
199  }
200
201  public Boolean getIsAssociatedWithAppItem() {
202    return isAssociatedWithAppItem;
203  }
204
205  public List<Collection> getCollections() {
206    return collections;
207  }
208
209  @Override
210  public boolean equals(Object o) {
211    if (this == o) {
212      return true;
213    }
214    if (o == null || getClass() != o.getClass()) {
215      return false;
216    }
217    FolderFull casted = (FolderFull) o;
218    return Objects.equals(id, casted.id)
219        && Objects.equals(etag, casted.etag)
220        && Objects.equals(type, casted.type)
221        && Objects.equals(sequenceId, casted.sequenceId)
222        && Objects.equals(name, casted.name)
223        && Objects.equals(createdAt, casted.createdAt)
224        && Objects.equals(modifiedAt, casted.modifiedAt)
225        && Objects.equals(description, casted.description)
226        && Objects.equals(size, casted.size)
227        && Objects.equals(pathCollection, casted.pathCollection)
228        && Objects.equals(createdBy, casted.createdBy)
229        && Objects.equals(modifiedBy, casted.modifiedBy)
230        && Objects.equals(trashedAt, casted.trashedAt)
231        && Objects.equals(purgedAt, casted.purgedAt)
232        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
233        && Objects.equals(contentModifiedAt, casted.contentModifiedAt)
234        && Objects.equals(ownedBy, casted.ownedBy)
235        && Objects.equals(sharedLink, casted.sharedLink)
236        && Objects.equals(folderUploadEmail, casted.folderUploadEmail)
237        && Objects.equals(parent, casted.parent)
238        && Objects.equals(itemStatus, casted.itemStatus)
239        && Objects.equals(itemCollection, casted.itemCollection)
240        && Objects.equals(syncState, casted.syncState)
241        && Objects.equals(hasCollaborations, casted.hasCollaborations)
242        && Objects.equals(permissions, casted.permissions)
243        && Objects.equals(tags, casted.tags)
244        && Objects.equals(canNonOwnersInvite, casted.canNonOwnersInvite)
245        && Objects.equals(isExternallyOwned, casted.isExternallyOwned)
246        && Objects.equals(metadata, casted.metadata)
247        && Objects.equals(
248            isCollaborationRestrictedToEnterprise, casted.isCollaborationRestrictedToEnterprise)
249        && Objects.equals(allowedSharedLinkAccessLevels, casted.allowedSharedLinkAccessLevels)
250        && Objects.equals(allowedInviteeRoles, casted.allowedInviteeRoles)
251        && Objects.equals(watermarkInfo, casted.watermarkInfo)
252        && Objects.equals(isAccessibleViaSharedLink, casted.isAccessibleViaSharedLink)
253        && Objects.equals(canNonOwnersViewCollaborators, casted.canNonOwnersViewCollaborators)
254        && Objects.equals(classification, casted.classification)
255        && Objects.equals(isAssociatedWithAppItem, casted.isAssociatedWithAppItem)
256        && Objects.equals(collections, casted.collections);
257  }
258
259  @Override
260  public int hashCode() {
261    return Objects.hash(
262        id,
263        etag,
264        type,
265        sequenceId,
266        name,
267        createdAt,
268        modifiedAt,
269        description,
270        size,
271        pathCollection,
272        createdBy,
273        modifiedBy,
274        trashedAt,
275        purgedAt,
276        contentCreatedAt,
277        contentModifiedAt,
278        ownedBy,
279        sharedLink,
280        folderUploadEmail,
281        parent,
282        itemStatus,
283        itemCollection,
284        syncState,
285        hasCollaborations,
286        permissions,
287        tags,
288        canNonOwnersInvite,
289        isExternallyOwned,
290        metadata,
291        isCollaborationRestrictedToEnterprise,
292        allowedSharedLinkAccessLevels,
293        allowedInviteeRoles,
294        watermarkInfo,
295        isAccessibleViaSharedLink,
296        canNonOwnersViewCollaborators,
297        classification,
298        isAssociatedWithAppItem,
299        collections);
300  }
301
302  @Override
303  public String toString() {
304    return "FolderFull{"
305        + "id='"
306        + id
307        + '\''
308        + ", "
309        + "etag='"
310        + etag
311        + '\''
312        + ", "
313        + "type='"
314        + type
315        + '\''
316        + ", "
317        + "sequenceId='"
318        + sequenceId
319        + '\''
320        + ", "
321        + "name='"
322        + name
323        + '\''
324        + ", "
325        + "createdAt='"
326        + createdAt
327        + '\''
328        + ", "
329        + "modifiedAt='"
330        + modifiedAt
331        + '\''
332        + ", "
333        + "description='"
334        + description
335        + '\''
336        + ", "
337        + "size='"
338        + size
339        + '\''
340        + ", "
341        + "pathCollection='"
342        + pathCollection
343        + '\''
344        + ", "
345        + "createdBy='"
346        + createdBy
347        + '\''
348        + ", "
349        + "modifiedBy='"
350        + modifiedBy
351        + '\''
352        + ", "
353        + "trashedAt='"
354        + trashedAt
355        + '\''
356        + ", "
357        + "purgedAt='"
358        + purgedAt
359        + '\''
360        + ", "
361        + "contentCreatedAt='"
362        + contentCreatedAt
363        + '\''
364        + ", "
365        + "contentModifiedAt='"
366        + contentModifiedAt
367        + '\''
368        + ", "
369        + "ownedBy='"
370        + ownedBy
371        + '\''
372        + ", "
373        + "sharedLink='"
374        + sharedLink
375        + '\''
376        + ", "
377        + "folderUploadEmail='"
378        + folderUploadEmail
379        + '\''
380        + ", "
381        + "parent='"
382        + parent
383        + '\''
384        + ", "
385        + "itemStatus='"
386        + itemStatus
387        + '\''
388        + ", "
389        + "itemCollection='"
390        + itemCollection
391        + '\''
392        + ", "
393        + "syncState='"
394        + syncState
395        + '\''
396        + ", "
397        + "hasCollaborations='"
398        + hasCollaborations
399        + '\''
400        + ", "
401        + "permissions='"
402        + permissions
403        + '\''
404        + ", "
405        + "tags='"
406        + tags
407        + '\''
408        + ", "
409        + "canNonOwnersInvite='"
410        + canNonOwnersInvite
411        + '\''
412        + ", "
413        + "isExternallyOwned='"
414        + isExternallyOwned
415        + '\''
416        + ", "
417        + "metadata='"
418        + metadata
419        + '\''
420        + ", "
421        + "isCollaborationRestrictedToEnterprise='"
422        + isCollaborationRestrictedToEnterprise
423        + '\''
424        + ", "
425        + "allowedSharedLinkAccessLevels='"
426        + allowedSharedLinkAccessLevels
427        + '\''
428        + ", "
429        + "allowedInviteeRoles='"
430        + allowedInviteeRoles
431        + '\''
432        + ", "
433        + "watermarkInfo='"
434        + watermarkInfo
435        + '\''
436        + ", "
437        + "isAccessibleViaSharedLink='"
438        + isAccessibleViaSharedLink
439        + '\''
440        + ", "
441        + "canNonOwnersViewCollaborators='"
442        + canNonOwnersViewCollaborators
443        + '\''
444        + ", "
445        + "classification='"
446        + classification
447        + '\''
448        + ", "
449        + "isAssociatedWithAppItem='"
450        + isAssociatedWithAppItem
451        + '\''
452        + ", "
453        + "collections='"
454        + collections
455        + '\''
456        + "}";
457  }
458
459  public static class Builder extends Folder.Builder {
460
461    protected EnumWrapper<FolderFullSyncStateField> syncState;
462
463    protected Boolean hasCollaborations;
464
465    protected FolderFullPermissionsField permissions;
466
467    protected List<String> tags;
468
469    protected Boolean canNonOwnersInvite;
470
471    protected Boolean isExternallyOwned;
472
473    protected FolderFullMetadataField metadata;
474
475    protected Boolean isCollaborationRestrictedToEnterprise;
476
477    protected List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>
478        allowedSharedLinkAccessLevels;
479
480    protected List<EnumWrapper<FolderFullAllowedInviteeRolesField>> allowedInviteeRoles;
481
482    protected FolderFullWatermarkInfoField watermarkInfo;
483
484    protected Boolean isAccessibleViaSharedLink;
485
486    protected Boolean canNonOwnersViewCollaborators;
487
488    protected FolderFullClassificationField classification;
489
490    protected Boolean isAssociatedWithAppItem;
491
492    protected List<Collection> collections;
493
494    public Builder(String id) {
495      super(id);
496    }
497
498    public Builder syncState(FolderFullSyncStateField syncState) {
499      this.syncState = new EnumWrapper<FolderFullSyncStateField>(syncState);
500      return this;
501    }
502
503    public Builder syncState(EnumWrapper<FolderFullSyncStateField> syncState) {
504      this.syncState = syncState;
505      return this;
506    }
507
508    public Builder hasCollaborations(Boolean hasCollaborations) {
509      this.hasCollaborations = hasCollaborations;
510      return this;
511    }
512
513    public Builder permissions(FolderFullPermissionsField permissions) {
514      this.permissions = permissions;
515      return this;
516    }
517
518    public Builder tags(List<String> tags) {
519      this.tags = tags;
520      return this;
521    }
522
523    public Builder canNonOwnersInvite(Boolean canNonOwnersInvite) {
524      this.canNonOwnersInvite = canNonOwnersInvite;
525      return this;
526    }
527
528    public Builder isExternallyOwned(Boolean isExternallyOwned) {
529      this.isExternallyOwned = isExternallyOwned;
530      return this;
531    }
532
533    public Builder metadata(FolderFullMetadataField metadata) {
534      this.metadata = metadata;
535      return this;
536    }
537
538    public Builder isCollaborationRestrictedToEnterprise(
539        Boolean isCollaborationRestrictedToEnterprise) {
540      this.isCollaborationRestrictedToEnterprise = isCollaborationRestrictedToEnterprise;
541      return this;
542    }
543
544    public Builder allowedSharedLinkAccessLevels(
545        List<? extends Valuable> allowedSharedLinkAccessLevels) {
546      this.allowedSharedLinkAccessLevels =
547          EnumWrapper.wrapValuableEnumList(
548              allowedSharedLinkAccessLevels, FolderFullAllowedSharedLinkAccessLevelsField.class);
549      return this;
550    }
551
552    public Builder allowedInviteeRoles(List<? extends Valuable> allowedInviteeRoles) {
553      this.allowedInviteeRoles =
554          EnumWrapper.wrapValuableEnumList(
555              allowedInviteeRoles, FolderFullAllowedInviteeRolesField.class);
556      return this;
557    }
558
559    public Builder watermarkInfo(FolderFullWatermarkInfoField watermarkInfo) {
560      this.watermarkInfo = watermarkInfo;
561      return this;
562    }
563
564    public Builder isAccessibleViaSharedLink(Boolean isAccessibleViaSharedLink) {
565      this.isAccessibleViaSharedLink = isAccessibleViaSharedLink;
566      return this;
567    }
568
569    public Builder canNonOwnersViewCollaborators(Boolean canNonOwnersViewCollaborators) {
570      this.canNonOwnersViewCollaborators = canNonOwnersViewCollaborators;
571      return this;
572    }
573
574    public Builder classification(FolderFullClassificationField classification) {
575      this.classification = classification;
576      return this;
577    }
578
579    public Builder isAssociatedWithAppItem(Boolean isAssociatedWithAppItem) {
580      this.isAssociatedWithAppItem = isAssociatedWithAppItem;
581      return this;
582    }
583
584    public Builder collections(List<Collection> collections) {
585      this.collections = collections;
586      return this;
587    }
588
589    @Override
590    public Builder etag(String etag) {
591      this.etag = etag;
592      this.markNullableFieldAsSet("etag");
593      return this;
594    }
595
596    @Override
597    public Builder type(FolderBaseTypeField type) {
598      this.type = new EnumWrapper<FolderBaseTypeField>(type);
599      return this;
600    }
601
602    @Override
603    public Builder type(EnumWrapper<FolderBaseTypeField> type) {
604      this.type = type;
605      return this;
606    }
607
608    @Override
609    public Builder sequenceId(String sequenceId) {
610      this.sequenceId = sequenceId;
611      return this;
612    }
613
614    @Override
615    public Builder name(String name) {
616      this.name = name;
617      return this;
618    }
619
620    @Override
621    public Builder createdAt(OffsetDateTime createdAt) {
622      this.createdAt = createdAt;
623      this.markNullableFieldAsSet("created_at");
624      return this;
625    }
626
627    @Override
628    public Builder modifiedAt(OffsetDateTime modifiedAt) {
629      this.modifiedAt = modifiedAt;
630      this.markNullableFieldAsSet("modified_at");
631      return this;
632    }
633
634    @Override
635    public Builder description(String description) {
636      this.description = description;
637      return this;
638    }
639
640    @Override
641    public Builder size(Long size) {
642      this.size = size;
643      return this;
644    }
645
646    @Override
647    public Builder pathCollection(FolderPathCollectionField pathCollection) {
648      this.pathCollection = pathCollection;
649      return this;
650    }
651
652    @Override
653    public Builder createdBy(UserMini createdBy) {
654      this.createdBy = createdBy;
655      return this;
656    }
657
658    @Override
659    public Builder modifiedBy(UserMini modifiedBy) {
660      this.modifiedBy = modifiedBy;
661      return this;
662    }
663
664    @Override
665    public Builder trashedAt(OffsetDateTime trashedAt) {
666      this.trashedAt = trashedAt;
667      this.markNullableFieldAsSet("trashed_at");
668      return this;
669    }
670
671    @Override
672    public Builder purgedAt(OffsetDateTime purgedAt) {
673      this.purgedAt = purgedAt;
674      this.markNullableFieldAsSet("purged_at");
675      return this;
676    }
677
678    @Override
679    public Builder contentCreatedAt(OffsetDateTime contentCreatedAt) {
680      this.contentCreatedAt = contentCreatedAt;
681      this.markNullableFieldAsSet("content_created_at");
682      return this;
683    }
684
685    @Override
686    public Builder contentModifiedAt(OffsetDateTime contentModifiedAt) {
687      this.contentModifiedAt = contentModifiedAt;
688      this.markNullableFieldAsSet("content_modified_at");
689      return this;
690    }
691
692    @Override
693    public Builder ownedBy(UserMini ownedBy) {
694      this.ownedBy = ownedBy;
695      return this;
696    }
697
698    @Override
699    public Builder sharedLink(FolderSharedLinkField sharedLink) {
700      this.sharedLink = sharedLink;
701      this.markNullableFieldAsSet("shared_link");
702      return this;
703    }
704
705    @Override
706    public Builder folderUploadEmail(FolderFolderUploadEmailField folderUploadEmail) {
707      this.folderUploadEmail = folderUploadEmail;
708      this.markNullableFieldAsSet("folder_upload_email");
709      return this;
710    }
711
712    @Override
713    public Builder parent(FolderMini parent) {
714      this.parent = parent;
715      this.markNullableFieldAsSet("parent");
716      return this;
717    }
718
719    @Override
720    public Builder itemStatus(FolderItemStatusField itemStatus) {
721      this.itemStatus = new EnumWrapper<FolderItemStatusField>(itemStatus);
722      return this;
723    }
724
725    @Override
726    public Builder itemStatus(EnumWrapper<FolderItemStatusField> itemStatus) {
727      this.itemStatus = itemStatus;
728      return this;
729    }
730
731    @Override
732    public Builder itemCollection(Items itemCollection) {
733      this.itemCollection = itemCollection;
734      return this;
735    }
736
737    public FolderFull build() {
738      if (this.type == null) {
739        this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
740      }
741      return new FolderFull(this);
742    }
743  }
744
745  public static class AllowedSharedLinkAccessLevelsDeserializer
746      extends JsonDeserializer<List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>> {
747
748    public final JsonDeserializer<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>
749        elementDeserializer;
750
751    public AllowedSharedLinkAccessLevelsDeserializer() {
752      super();
753      this.elementDeserializer =
754          new FolderFullAllowedSharedLinkAccessLevelsField
755              .FolderFullAllowedSharedLinkAccessLevelsFieldDeserializer();
756    }
757
758    @Override
759    public List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>> deserialize(
760        JsonParser p, DeserializationContext ctxt) throws IOException {
761      JsonNode node = p.getCodec().readTree(p);
762      List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>> elements = new ArrayList<>();
763      for (JsonNode item : node) {
764        JsonParser pa = item.traverse(p.getCodec());
765        pa.nextToken();
766        elements.add(elementDeserializer.deserialize(pa, ctxt));
767      }
768      return elements;
769    }
770  }
771
772  public static class AllowedSharedLinkAccessLevelsSerializer
773      extends JsonSerializer<List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>> {
774
775    public final JsonSerializer<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>>
776        elementSerializer;
777
778    public AllowedSharedLinkAccessLevelsSerializer() {
779      super();
780      this.elementSerializer =
781          new FolderFullAllowedSharedLinkAccessLevelsField
782              .FolderFullAllowedSharedLinkAccessLevelsFieldSerializer();
783    }
784
785    @Override
786    public void serialize(
787        List<EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField>> value,
788        JsonGenerator gen,
789        SerializerProvider serializers)
790        throws IOException {
791      gen.writeStartArray();
792      for (EnumWrapper<FolderFullAllowedSharedLinkAccessLevelsField> item : value) {
793        elementSerializer.serialize(item, gen, serializers);
794      }
795      gen.writeEndArray();
796    }
797  }
798
799  public static class AllowedInviteeRolesDeserializer
800      extends JsonDeserializer<List<EnumWrapper<FolderFullAllowedInviteeRolesField>>> {
801
802    public final JsonDeserializer<EnumWrapper<FolderFullAllowedInviteeRolesField>>
803        elementDeserializer;
804
805    public AllowedInviteeRolesDeserializer() {
806      super();
807      this.elementDeserializer =
808          new FolderFullAllowedInviteeRolesField.FolderFullAllowedInviteeRolesFieldDeserializer();
809    }
810
811    @Override
812    public List<EnumWrapper<FolderFullAllowedInviteeRolesField>> deserialize(
813        JsonParser p, DeserializationContext ctxt) throws IOException {
814      JsonNode node = p.getCodec().readTree(p);
815      List<EnumWrapper<FolderFullAllowedInviteeRolesField>> elements = new ArrayList<>();
816      for (JsonNode item : node) {
817        JsonParser pa = item.traverse(p.getCodec());
818        pa.nextToken();
819        elements.add(elementDeserializer.deserialize(pa, ctxt));
820      }
821      return elements;
822    }
823  }
824
825  public static class AllowedInviteeRolesSerializer
826      extends JsonSerializer<List<EnumWrapper<FolderFullAllowedInviteeRolesField>>> {
827
828    public final JsonSerializer<EnumWrapper<FolderFullAllowedInviteeRolesField>> elementSerializer;
829
830    public AllowedInviteeRolesSerializer() {
831      super();
832      this.elementSerializer =
833          new FolderFullAllowedInviteeRolesField.FolderFullAllowedInviteeRolesFieldSerializer();
834    }
835
836    @Override
837    public void serialize(
838        List<EnumWrapper<FolderFullAllowedInviteeRolesField>> value,
839        JsonGenerator gen,
840        SerializerProvider serializers)
841        throws IOException {
842      gen.writeStartArray();
843      for (EnumWrapper<FolderFullAllowedInviteeRolesField> item : value) {
844        elementSerializer.serialize(item, gen, serializers);
845      }
846      gen.writeEndArray();
847    }
848  }
849}