• 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

3.64
/src/main/java/com/box/sdkgen/schemas/filefull/FileFullLockField.java
1
package com.box.sdkgen.schemas.filefull;
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.schemas.usermini.UserMini;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonFilter;
10
import com.fasterxml.jackson.annotation.JsonProperty;
11
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
12
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
13
import java.time.OffsetDateTime;
14
import java.util.Objects;
15

16
@JsonFilter("nullablePropertyFilter")
17
public class FileFullLockField extends SerializableObject {
18

19
  /** The unique identifier for this lock. */
20
  protected String id;
21

22
  /** The value will always be `lock`. */
23
  @JsonDeserialize(using = FileFullLockTypeField.FileFullLockTypeFieldDeserializer.class)
24
  @JsonSerialize(using = FileFullLockTypeField.FileFullLockTypeFieldSerializer.class)
25
  protected EnumWrapper<FileFullLockTypeField> type;
26

27
  @JsonProperty("created_by")
28
  protected UserMini createdBy;
29

30
  /** The time this lock was created at. */
31
  @JsonProperty("created_at")
32
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
33
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
34
  protected OffsetDateTime createdAt;
35

36
  /** The time this lock is to expire at, which might be in the past. */
37
  @JsonProperty("expired_at")
38
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
39
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
40
  protected OffsetDateTime expiredAt;
41

42
  /** Whether or not the file can be downloaded while locked. */
43
  @JsonProperty("is_download_prevented")
44
  protected Boolean isDownloadPrevented;
45

46
  /**
47
   * If the lock is managed by an application rather than a user, this field identifies the type of
48
   * the application that holds the lock. This is an open enum and may be extended with additional
49
   * values in the future.
50
   */
51
  @JsonDeserialize(using = FileFullLockAppTypeField.FileFullLockAppTypeFieldDeserializer.class)
52
  @JsonSerialize(using = FileFullLockAppTypeField.FileFullLockAppTypeFieldSerializer.class)
53
  @JsonProperty("app_type")
54
  @Nullable
55
  protected EnumWrapper<FileFullLockAppTypeField> appType;
56

57
  public FileFullLockField() {
58
    super();
1✔
59
  }
1✔
60

61
  protected FileFullLockField(Builder builder) {
62
    super();
×
63
    this.id = builder.id;
×
64
    this.type = builder.type;
×
65
    this.createdBy = builder.createdBy;
×
66
    this.createdAt = builder.createdAt;
×
67
    this.expiredAt = builder.expiredAt;
×
68
    this.isDownloadPrevented = builder.isDownloadPrevented;
×
69
    this.appType = builder.appType;
×
70
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
71
  }
×
72

73
  public String getId() {
74
    return id;
×
75
  }
76

77
  public EnumWrapper<FileFullLockTypeField> getType() {
78
    return type;
×
79
  }
80

81
  public UserMini getCreatedBy() {
82
    return createdBy;
×
83
  }
84

85
  public OffsetDateTime getCreatedAt() {
86
    return createdAt;
×
87
  }
88

89
  public OffsetDateTime getExpiredAt() {
90
    return expiredAt;
×
91
  }
92

93
  public Boolean getIsDownloadPrevented() {
94
    return isDownloadPrevented;
×
95
  }
96

97
  public EnumWrapper<FileFullLockAppTypeField> getAppType() {
98
    return appType;
×
99
  }
100

101
  @Override
102
  public boolean equals(Object o) {
103
    if (this == o) {
×
104
      return true;
×
105
    }
106
    if (o == null || getClass() != o.getClass()) {
×
107
      return false;
×
108
    }
109
    FileFullLockField casted = (FileFullLockField) o;
×
110
    return Objects.equals(id, casted.id)
×
111
        && Objects.equals(type, casted.type)
×
112
        && Objects.equals(createdBy, casted.createdBy)
×
113
        && Objects.equals(createdAt, casted.createdAt)
×
114
        && Objects.equals(expiredAt, casted.expiredAt)
×
115
        && Objects.equals(isDownloadPrevented, casted.isDownloadPrevented)
×
116
        && Objects.equals(appType, casted.appType);
×
117
  }
118

119
  @Override
120
  public int hashCode() {
121
    return Objects.hash(id, type, createdBy, createdAt, expiredAt, isDownloadPrevented, appType);
×
122
  }
123

124
  @Override
125
  public String toString() {
126
    return "FileFullLockField{"
×
127
        + "id='"
128
        + id
129
        + '\''
130
        + ", "
131
        + "type='"
132
        + type
133
        + '\''
134
        + ", "
135
        + "createdBy='"
136
        + createdBy
137
        + '\''
138
        + ", "
139
        + "createdAt='"
140
        + createdAt
141
        + '\''
142
        + ", "
143
        + "expiredAt='"
144
        + expiredAt
145
        + '\''
146
        + ", "
147
        + "isDownloadPrevented='"
148
        + isDownloadPrevented
149
        + '\''
150
        + ", "
151
        + "appType='"
152
        + appType
153
        + '\''
154
        + "}";
155
  }
156

157
  public static class Builder extends NullableFieldTracker {
×
158

159
    protected String id;
160

161
    protected EnumWrapper<FileFullLockTypeField> type;
162

163
    protected UserMini createdBy;
164

165
    protected OffsetDateTime createdAt;
166

167
    protected OffsetDateTime expiredAt;
168

169
    protected Boolean isDownloadPrevented;
170

171
    protected EnumWrapper<FileFullLockAppTypeField> appType;
172

173
    public Builder id(String id) {
174
      this.id = id;
×
175
      return this;
×
176
    }
177

178
    public Builder type(FileFullLockTypeField type) {
179
      this.type = new EnumWrapper<FileFullLockTypeField>(type);
×
180
      return this;
×
181
    }
182

183
    public Builder type(EnumWrapper<FileFullLockTypeField> type) {
184
      this.type = type;
×
185
      return this;
×
186
    }
187

188
    public Builder createdBy(UserMini createdBy) {
189
      this.createdBy = createdBy;
×
190
      return this;
×
191
    }
192

193
    public Builder createdAt(OffsetDateTime createdAt) {
194
      this.createdAt = createdAt;
×
195
      return this;
×
196
    }
197

198
    public Builder expiredAt(OffsetDateTime expiredAt) {
199
      this.expiredAt = expiredAt;
×
200
      return this;
×
201
    }
202

203
    public Builder isDownloadPrevented(Boolean isDownloadPrevented) {
204
      this.isDownloadPrevented = isDownloadPrevented;
×
205
      return this;
×
206
    }
207

208
    public Builder appType(FileFullLockAppTypeField appType) {
209
      this.appType = new EnumWrapper<FileFullLockAppTypeField>(appType);
×
210
      this.markNullableFieldAsSet("app_type");
×
211
      return this;
×
212
    }
213

214
    public Builder appType(EnumWrapper<FileFullLockAppTypeField> appType) {
215
      this.appType = appType;
×
216
      this.markNullableFieldAsSet("app_type");
×
217
      return this;
×
218
    }
219

220
    public FileFullLockField build() {
221
      return new FileFullLockField(this);
×
222
    }
223
  }
224
}
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