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

box / box-java-sdk / #5922

17 Dec 2025 05:03PM UTC coverage: 35.498% (-0.4%) from 35.917%
#5922

push

github

web-flow
fix: add taxonomy to Metadata Field (read) definition (box/box-openapi#572) (#1644)

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

2 of 2 new or added lines in 1 file covered. (100.0%)

535 existing lines in 31 files now uncovered.

18926 of 53316 relevant lines covered (35.5%)

0.35 hits per line

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

39.47
/src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java
1
package com.box.sdkgen.managers.usercollaborations;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.internal.utils.DateTimeUtils;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.time.OffsetDateTime;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class UpdateCollaborationByIdRequestBody extends SerializableObject {
16

17
  /** The level of access granted. */
18
  @JsonDeserialize(
19
      using =
20
          UpdateCollaborationByIdRequestBodyRoleField
21
              .UpdateCollaborationByIdRequestBodyRoleFieldDeserializer.class)
22
  @JsonSerialize(
23
      using =
24
          UpdateCollaborationByIdRequestBodyRoleField
25
              .UpdateCollaborationByIdRequestBodyRoleFieldSerializer.class)
26
  protected EnumWrapper<UpdateCollaborationByIdRequestBodyRoleField> role;
27

28
  /**
29
   * Set the status of a `pending` collaboration invitation, effectively accepting, or rejecting the
30
   * invite.
31
   */
32
  @JsonDeserialize(
33
      using =
34
          UpdateCollaborationByIdRequestBodyStatusField
35
              .UpdateCollaborationByIdRequestBodyStatusFieldDeserializer.class)
36
  @JsonSerialize(
37
      using =
38
          UpdateCollaborationByIdRequestBodyStatusField
39
              .UpdateCollaborationByIdRequestBodyStatusFieldSerializer.class)
40
  protected EnumWrapper<UpdateCollaborationByIdRequestBodyStatusField> status;
41

42
  /**
43
   * Update the expiration date for the collaboration. At this date, the collaboration will be
44
   * automatically removed from the item.
45
   *
46
   * <p>This feature will only work if the **Automatically remove invited collaborators: Allow
47
   * folder owners to extend the expiry date** setting has been enabled in the **Enterprise
48
   * Settings** of the **Admin Console**. When the setting is not enabled, collaborations can not
49
   * have an expiry date and a value for this field will be result in an error.
50
   *
51
   * <p>Additionally, a collaboration can only be given an expiration if it was created after the
52
   * **Automatically remove invited collaborator** setting was enabled.
53
   */
54
  @JsonProperty("expires_at")
55
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
56
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
57
  protected OffsetDateTime expiresAt;
58

59
  /**
60
   * Determines if the invited users can see the entire parent path to the associated folder. The
61
   * user will not gain privileges in any parent folder and therefore can not see content the user
62
   * is not collaborated on.
63
   *
64
   * <p>Be aware that this meaningfully increases the time required to load the invitee's **All
65
   * Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled
66
   * to 1,000 per user.
67
   *
68
   * <p>Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only
69
   * an owner can update `can_view_path` on existing collaborations.
70
   *
71
   * <p>`can_view_path` can only be used for folder collaborations.
72
   *
73
   * <p>When you delete a folder with `can_view_path=true`, collaborators may still see the parent
74
   * path. For instructions on how to remove this, see [Even though a folder invited via
75
   * can_view_path is deleted, the path remains
76
   * displayed](https://support.box.com/hc/en-us/articles/37472814319891-Even-though-a-folder-invited-via-can-view-path-is-deleted-the-path-remains-displayed).
77
   */
78
  @JsonProperty("can_view_path")
79
  protected Boolean canViewPath;
80

81
  public UpdateCollaborationByIdRequestBody() {
UNCOV
82
    super();
×
UNCOV
83
  }
×
84

85
  protected UpdateCollaborationByIdRequestBody(Builder builder) {
86
    super();
1✔
87
    this.role = builder.role;
1✔
88
    this.status = builder.status;
1✔
89
    this.expiresAt = builder.expiresAt;
1✔
90
    this.canViewPath = builder.canViewPath;
1✔
91
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
92
  }
1✔
93

94
  public EnumWrapper<UpdateCollaborationByIdRequestBodyRoleField> getRole() {
95
    return role;
1✔
96
  }
97

98
  public EnumWrapper<UpdateCollaborationByIdRequestBodyStatusField> getStatus() {
99
    return status;
1✔
100
  }
101

102
  public OffsetDateTime getExpiresAt() {
103
    return expiresAt;
1✔
104
  }
105

106
  public Boolean getCanViewPath() {
107
    return canViewPath;
1✔
108
  }
109

110
  @Override
111
  public boolean equals(Object o) {
UNCOV
112
    if (this == o) {
×
113
      return true;
×
114
    }
115
    if (o == null || getClass() != o.getClass()) {
×
116
      return false;
×
117
    }
UNCOV
118
    UpdateCollaborationByIdRequestBody casted = (UpdateCollaborationByIdRequestBody) o;
×
UNCOV
119
    return Objects.equals(role, casted.role)
×
UNCOV
120
        && Objects.equals(status, casted.status)
×
UNCOV
121
        && Objects.equals(expiresAt, casted.expiresAt)
×
122
        && Objects.equals(canViewPath, casted.canViewPath);
×
123
  }
124

125
  @Override
126
  public int hashCode() {
127
    return Objects.hash(role, status, expiresAt, canViewPath);
×
128
  }
129

130
  @Override
131
  public String toString() {
UNCOV
132
    return "UpdateCollaborationByIdRequestBody{"
×
133
        + "role='"
134
        + role
135
        + '\''
136
        + ", "
137
        + "status='"
138
        + status
139
        + '\''
140
        + ", "
141
        + "expiresAt='"
142
        + expiresAt
143
        + '\''
144
        + ", "
145
        + "canViewPath='"
146
        + canViewPath
147
        + '\''
148
        + "}";
149
  }
150

151
  public static class Builder extends NullableFieldTracker {
1✔
152

153
    protected EnumWrapper<UpdateCollaborationByIdRequestBodyRoleField> role;
154

155
    protected EnumWrapper<UpdateCollaborationByIdRequestBodyStatusField> status;
156

157
    protected OffsetDateTime expiresAt;
158

159
    protected Boolean canViewPath;
160

161
    public Builder role(UpdateCollaborationByIdRequestBodyRoleField role) {
162
      this.role = new EnumWrapper<UpdateCollaborationByIdRequestBodyRoleField>(role);
1✔
163
      return this;
1✔
164
    }
165

166
    public Builder role(EnumWrapper<UpdateCollaborationByIdRequestBodyRoleField> role) {
167
      this.role = role;
×
168
      return this;
×
169
    }
170

171
    public Builder status(UpdateCollaborationByIdRequestBodyStatusField status) {
172
      this.status = new EnumWrapper<UpdateCollaborationByIdRequestBodyStatusField>(status);
×
173
      return this;
×
174
    }
175

176
    public Builder status(EnumWrapper<UpdateCollaborationByIdRequestBodyStatusField> status) {
177
      this.status = status;
×
178
      return this;
×
179
    }
180

181
    public Builder expiresAt(OffsetDateTime expiresAt) {
182
      this.expiresAt = expiresAt;
×
183
      return this;
×
184
    }
185

186
    public Builder canViewPath(Boolean canViewPath) {
UNCOV
187
      this.canViewPath = canViewPath;
×
UNCOV
188
      return this;
×
189
    }
190

191
    public UpdateCollaborationByIdRequestBody build() {
192
      return new UpdateCollaborationByIdRequestBody(this);
1✔
193
    }
194
  }
195
}
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

© 2025 Coveralls, Inc