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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

0.0
/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java
1
package com.box.sdkgen.managers.files;
2

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

15
@JsonFilter("nullablePropertyFilter")
16
public class UpdateFileByIdRequestBodySharedLinkField extends SerializableObject {
17

18
  /**
19
   * The level of access for the shared link. This can be restricted to anyone with the link
20
   * (`open`), only people within the company (`company`) and only those who have been invited to
21
   * the folder (`collaborators`).
22
   *
23
   * <p>If not set, this field defaults to the access level specified by the enterprise admin. To
24
   * create a shared link with this default setting pass the `shared_link` object with no `access`
25
   * field, for example `{ "shared_link": {} }`.
26
   *
27
   * <p>The `company` access level is only available to paid accounts.
28
   */
29
  @JsonDeserialize(
30
      using =
31
          UpdateFileByIdRequestBodySharedLinkAccessField
32
              .UpdateFileByIdRequestBodySharedLinkAccessFieldDeserializer.class)
33
  @JsonSerialize(
34
      using =
35
          UpdateFileByIdRequestBodySharedLinkAccessField
36
              .UpdateFileByIdRequestBodySharedLinkAccessFieldSerializer.class)
37
  protected EnumWrapper<UpdateFileByIdRequestBodySharedLinkAccessField> access;
38

39
  /**
40
   * The password required to access the shared link. Set the password to `null` to remove it.
41
   * Passwords must now be at least eight characters long and include a number, upper case letter,
42
   * or a non-numeric or non-alphabetic character. A password can only be set when `access` is set
43
   * to `open`.
44
   */
45
  @Nullable protected String password;
46

47
  /**
48
   * Defines a custom vanity name to use in the shared link URL, for example
49
   * `https://app.box.com/v/my-shared-link`.
50
   *
51
   * <p>Custom URLs should not be used when sharing sensitive content as vanity URLs are a lot
52
   * easier to guess than regular shared links.
53
   */
54
  @JsonProperty("vanity_name")
55
  protected String vanityName;
56

57
  /**
58
   * The timestamp at which this shared link will expire. This field can only be set by users with
59
   * paid accounts.
60
   */
61
  @JsonProperty("unshared_at")
62
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
63
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
64
  protected OffsetDateTime unsharedAt;
65

66
  protected UpdateFileByIdRequestBodySharedLinkPermissionsField permissions;
67

68
  public UpdateFileByIdRequestBodySharedLinkField() {
69
    super();
×
70
  }
×
71

72
  protected UpdateFileByIdRequestBodySharedLinkField(Builder builder) {
73
    super();
×
74
    this.access = builder.access;
×
75
    this.password = builder.password;
×
76
    this.vanityName = builder.vanityName;
×
77
    this.unsharedAt = builder.unsharedAt;
×
78
    this.permissions = builder.permissions;
×
79
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
80
  }
×
81

82
  public EnumWrapper<UpdateFileByIdRequestBodySharedLinkAccessField> getAccess() {
83
    return access;
×
84
  }
85

86
  public String getPassword() {
87
    return password;
×
88
  }
89

90
  public String getVanityName() {
91
    return vanityName;
×
92
  }
93

94
  public OffsetDateTime getUnsharedAt() {
95
    return unsharedAt;
×
96
  }
97

98
  public UpdateFileByIdRequestBodySharedLinkPermissionsField getPermissions() {
99
    return permissions;
×
100
  }
101

102
  @Override
103
  public boolean equals(Object o) {
104
    if (this == o) {
×
105
      return true;
×
106
    }
107
    if (o == null || getClass() != o.getClass()) {
×
108
      return false;
×
109
    }
110
    UpdateFileByIdRequestBodySharedLinkField casted = (UpdateFileByIdRequestBodySharedLinkField) o;
×
111
    return Objects.equals(access, casted.access)
×
112
        && Objects.equals(password, casted.password)
×
113
        && Objects.equals(vanityName, casted.vanityName)
×
114
        && Objects.equals(unsharedAt, casted.unsharedAt)
×
115
        && Objects.equals(permissions, casted.permissions);
×
116
  }
117

118
  @Override
119
  public int hashCode() {
120
    return Objects.hash(access, password, vanityName, unsharedAt, permissions);
×
121
  }
122

123
  @Override
124
  public String toString() {
125
    return "UpdateFileByIdRequestBodySharedLinkField{"
×
126
        + "access='"
127
        + access
128
        + '\''
129
        + ", "
130
        + "password='"
131
        + password
132
        + '\''
133
        + ", "
134
        + "vanityName='"
135
        + vanityName
136
        + '\''
137
        + ", "
138
        + "unsharedAt='"
139
        + unsharedAt
140
        + '\''
141
        + ", "
142
        + "permissions='"
143
        + permissions
144
        + '\''
145
        + "}";
146
  }
147

148
  public static class Builder extends NullableFieldTracker {
×
149

150
    protected EnumWrapper<UpdateFileByIdRequestBodySharedLinkAccessField> access;
151

152
    protected String password;
153

154
    protected String vanityName;
155

156
    protected OffsetDateTime unsharedAt;
157

158
    protected UpdateFileByIdRequestBodySharedLinkPermissionsField permissions;
159

160
    public Builder access(UpdateFileByIdRequestBodySharedLinkAccessField access) {
161
      this.access = new EnumWrapper<UpdateFileByIdRequestBodySharedLinkAccessField>(access);
×
162
      return this;
×
163
    }
164

165
    public Builder access(EnumWrapper<UpdateFileByIdRequestBodySharedLinkAccessField> access) {
166
      this.access = access;
×
167
      return this;
×
168
    }
169

170
    public Builder password(String password) {
171
      this.password = password;
×
172
      this.markNullableFieldAsSet("password");
×
173
      return this;
×
174
    }
175

176
    public Builder vanityName(String vanityName) {
177
      this.vanityName = vanityName;
×
178
      return this;
×
179
    }
180

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

186
    public Builder permissions(UpdateFileByIdRequestBodySharedLinkPermissionsField permissions) {
187
      this.permissions = permissions;
×
188
      return this;
×
189
    }
190

191
    public UpdateFileByIdRequestBodySharedLinkField build() {
192
      return new UpdateFileByIdRequestBodySharedLinkField(this);
×
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

© 2026 Coveralls, Inc