• 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

10.2
/src/main/java/com/box/sdkgen/schemas/folderlock/FolderLock.java
1
package com.box.sdkgen.schemas.folderlock;
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.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.userbase.UserBase;
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
/**
16
 * Folder locks define access restrictions placed by folder owners to prevent specific folders from
17
 * being moved or deleted.
18
 */
19
@JsonFilter("nullablePropertyFilter")
20
public class FolderLock extends SerializableObject {
21

22
  protected FolderMini folder;
23

24
  /** The unique identifier for this folder lock. */
25
  protected String id;
26

27
  /** The object type, always `folder_lock`. */
28
  protected String type;
29

30
  @JsonProperty("created_by")
31
  protected UserBase createdBy;
32

33
  /** When the folder lock object was created. */
34
  @JsonProperty("created_at")
35
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
36
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
37
  protected OffsetDateTime createdAt;
38

39
  /**
40
   * The operations that have been locked. Currently the `move` and `delete` operations cannot be
41
   * locked separately, and both need to be set to `true`.
42
   */
43
  @JsonProperty("locked_operations")
44
  protected FolderLockLockedOperationsField lockedOperations;
45

46
  /** The lock type, always `freeze`. */
47
  @JsonProperty("lock_type")
48
  protected String lockType;
49

50
  public FolderLock() {
51
    super();
1✔
52
  }
1✔
53

54
  protected FolderLock(Builder builder) {
55
    super();
×
56
    this.folder = builder.folder;
×
57
    this.id = builder.id;
×
58
    this.type = builder.type;
×
59
    this.createdBy = builder.createdBy;
×
60
    this.createdAt = builder.createdAt;
×
61
    this.lockedOperations = builder.lockedOperations;
×
62
    this.lockType = builder.lockType;
×
63
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
64
  }
×
65

66
  public FolderMini getFolder() {
67
    return folder;
1✔
68
  }
69

70
  public String getId() {
71
    return id;
1✔
72
  }
73

74
  public String getType() {
75
    return type;
×
76
  }
77

78
  public UserBase getCreatedBy() {
79
    return createdBy;
×
80
  }
81

82
  public OffsetDateTime getCreatedAt() {
83
    return createdAt;
×
84
  }
85

86
  public FolderLockLockedOperationsField getLockedOperations() {
87
    return lockedOperations;
1✔
88
  }
89

90
  public String getLockType() {
91
    return lockType;
×
92
  }
93

94
  @Override
95
  public boolean equals(Object o) {
96
    if (this == o) {
×
97
      return true;
×
98
    }
99
    if (o == null || getClass() != o.getClass()) {
×
100
      return false;
×
101
    }
102
    FolderLock casted = (FolderLock) o;
×
103
    return Objects.equals(folder, casted.folder)
×
104
        && Objects.equals(id, casted.id)
×
105
        && Objects.equals(type, casted.type)
×
106
        && Objects.equals(createdBy, casted.createdBy)
×
107
        && Objects.equals(createdAt, casted.createdAt)
×
108
        && Objects.equals(lockedOperations, casted.lockedOperations)
×
109
        && Objects.equals(lockType, casted.lockType);
×
110
  }
111

112
  @Override
113
  public int hashCode() {
114
    return Objects.hash(folder, id, type, createdBy, createdAt, lockedOperations, lockType);
×
115
  }
116

117
  @Override
118
  public String toString() {
119
    return "FolderLock{"
×
120
        + "folder='"
121
        + folder
122
        + '\''
123
        + ", "
124
        + "id='"
125
        + id
126
        + '\''
127
        + ", "
128
        + "type='"
129
        + type
130
        + '\''
131
        + ", "
132
        + "createdBy='"
133
        + createdBy
134
        + '\''
135
        + ", "
136
        + "createdAt='"
137
        + createdAt
138
        + '\''
139
        + ", "
140
        + "lockedOperations='"
141
        + lockedOperations
142
        + '\''
143
        + ", "
144
        + "lockType='"
145
        + lockType
146
        + '\''
147
        + "}";
148
  }
149

150
  public static class Builder extends NullableFieldTracker {
×
151

152
    protected FolderMini folder;
153

154
    protected String id;
155

156
    protected String type;
157

158
    protected UserBase createdBy;
159

160
    protected OffsetDateTime createdAt;
161

162
    protected FolderLockLockedOperationsField lockedOperations;
163

164
    protected String lockType;
165

166
    public Builder folder(FolderMini folder) {
167
      this.folder = folder;
×
168
      return this;
×
169
    }
170

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

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

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

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

191
    public Builder lockedOperations(FolderLockLockedOperationsField lockedOperations) {
192
      this.lockedOperations = lockedOperations;
×
193
      return this;
×
194
    }
195

196
    public Builder lockType(String lockType) {
197
      this.lockType = lockType;
×
198
      return this;
×
199
    }
200

201
    public FolderLock build() {
202
      return new FolderLock(this);
×
203
    }
204
  }
205
}
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