• 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

48.65
/src/main/java/com/box/sdkgen/managers/weblinks/UpdateWebLinkByIdRequestBodySharedLinkField.java
1
package com.box.sdkgen.managers.weblinks;
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 UpdateWebLinkByIdRequestBodySharedLinkField 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
          UpdateWebLinkByIdRequestBodySharedLinkAccessField
32
              .UpdateWebLinkByIdRequestBodySharedLinkAccessFieldDeserializer.class)
33
  @JsonSerialize(
34
      using =
35
          UpdateWebLinkByIdRequestBodySharedLinkAccessField
36
              .UpdateWebLinkByIdRequestBodySharedLinkAccessFieldSerializer.class)
37
  protected EnumWrapper<UpdateWebLinkByIdRequestBodySharedLinkAccessField> 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. The value must be greater than the current date and time.
60
   */
61
  @JsonProperty("unshared_at")
62
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
63
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
64
  protected OffsetDateTime unsharedAt;
65

66
  public UpdateWebLinkByIdRequestBodySharedLinkField() {
67
    super();
×
68
  }
×
69

70
  protected UpdateWebLinkByIdRequestBodySharedLinkField(Builder builder) {
71
    super();
1✔
72
    this.access = builder.access;
1✔
73
    this.password = builder.password;
1✔
74
    this.vanityName = builder.vanityName;
1✔
75
    this.unsharedAt = builder.unsharedAt;
1✔
76
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
77
  }
1✔
78

79
  public EnumWrapper<UpdateWebLinkByIdRequestBodySharedLinkAccessField> getAccess() {
80
    return access;
1✔
81
  }
82

83
  public String getPassword() {
84
    return password;
1✔
85
  }
86

87
  public String getVanityName() {
88
    return vanityName;
1✔
89
  }
90

91
  public OffsetDateTime getUnsharedAt() {
92
    return unsharedAt;
1✔
93
  }
94

95
  @Override
96
  public boolean equals(Object o) {
97
    if (this == o) {
×
98
      return true;
×
99
    }
100
    if (o == null || getClass() != o.getClass()) {
×
101
      return false;
×
102
    }
103
    UpdateWebLinkByIdRequestBodySharedLinkField casted =
×
104
        (UpdateWebLinkByIdRequestBodySharedLinkField) o;
105
    return Objects.equals(access, casted.access)
×
106
        && Objects.equals(password, casted.password)
×
107
        && Objects.equals(vanityName, casted.vanityName)
×
108
        && Objects.equals(unsharedAt, casted.unsharedAt);
×
109
  }
110

111
  @Override
112
  public int hashCode() {
113
    return Objects.hash(access, password, vanityName, unsharedAt);
×
114
  }
115

116
  @Override
117
  public String toString() {
118
    return "UpdateWebLinkByIdRequestBodySharedLinkField{"
×
119
        + "access='"
120
        + access
121
        + '\''
122
        + ", "
123
        + "password='"
124
        + password
125
        + '\''
126
        + ", "
127
        + "vanityName='"
128
        + vanityName
129
        + '\''
130
        + ", "
131
        + "unsharedAt='"
132
        + unsharedAt
133
        + '\''
134
        + "}";
135
  }
136

137
  public static class Builder extends NullableFieldTracker {
1✔
138

139
    protected EnumWrapper<UpdateWebLinkByIdRequestBodySharedLinkAccessField> access;
140

141
    protected String password;
142

143
    protected String vanityName;
144

145
    protected OffsetDateTime unsharedAt;
146

147
    public Builder access(UpdateWebLinkByIdRequestBodySharedLinkAccessField access) {
148
      this.access = new EnumWrapper<UpdateWebLinkByIdRequestBodySharedLinkAccessField>(access);
1✔
149
      return this;
1✔
150
    }
151

152
    public Builder access(EnumWrapper<UpdateWebLinkByIdRequestBodySharedLinkAccessField> access) {
153
      this.access = access;
×
154
      return this;
×
155
    }
156

157
    public Builder password(String password) {
158
      this.password = password;
1✔
159
      this.markNullableFieldAsSet("password");
1✔
160
      return this;
1✔
161
    }
162

163
    public Builder vanityName(String vanityName) {
164
      this.vanityName = vanityName;
×
165
      return this;
×
166
    }
167

168
    public Builder unsharedAt(OffsetDateTime unsharedAt) {
169
      this.unsharedAt = unsharedAt;
×
170
      return this;
×
171
    }
172

173
    public UpdateWebLinkByIdRequestBodySharedLinkField build() {
174
      return new UpdateWebLinkByIdRequestBodySharedLinkField(this);
1✔
175
    }
176
  }
177
}
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