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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

10.42
/src/main/java/com/box/sdkgen/schemas/folderlock/FolderLock.java
1
package com.box.sdkgen.schemas.folderlock;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.foldermini.FolderMini;
6
import com.box.sdkgen.schemas.userbase.UserBase;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
9
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10
import java.util.Date;
11
import java.util.Objects;
12

13
public class FolderLock extends SerializableObject {
14

15
  protected FolderMini folder;
16

17
  protected String id;
18

19
  protected String type;
20

21
  @JsonProperty("created_by")
22
  protected UserBase createdBy;
23

24
  @JsonProperty("created_at")
25
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
26
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
27
  protected Date createdAt;
28

29
  @JsonProperty("locked_operations")
30
  protected FolderLockLockedOperationsField lockedOperations;
31

32
  @JsonProperty("lock_type")
33
  protected String lockType;
34

35
  public FolderLock() {
36
    super();
1✔
37
  }
1✔
38

39
  protected FolderLock(Builder builder) {
40
    super();
×
41
    this.folder = builder.folder;
×
42
    this.id = builder.id;
×
43
    this.type = builder.type;
×
44
    this.createdBy = builder.createdBy;
×
45
    this.createdAt = builder.createdAt;
×
46
    this.lockedOperations = builder.lockedOperations;
×
47
    this.lockType = builder.lockType;
×
48
  }
×
49

50
  public FolderMini getFolder() {
51
    return folder;
1✔
52
  }
53

54
  public String getId() {
55
    return id;
1✔
56
  }
57

58
  public String getType() {
59
    return type;
×
60
  }
61

62
  public UserBase getCreatedBy() {
63
    return createdBy;
×
64
  }
65

66
  public Date getCreatedAt() {
67
    return createdAt;
×
68
  }
69

70
  public FolderLockLockedOperationsField getLockedOperations() {
71
    return lockedOperations;
1✔
72
  }
73

74
  public String getLockType() {
75
    return lockType;
×
76
  }
77

78
  @Override
79
  public boolean equals(Object o) {
80
    if (this == o) {
×
81
      return true;
×
82
    }
83
    if (o == null || getClass() != o.getClass()) {
×
84
      return false;
×
85
    }
86
    FolderLock casted = (FolderLock) o;
×
87
    return Objects.equals(folder, casted.folder)
×
88
        && Objects.equals(id, casted.id)
×
89
        && Objects.equals(type, casted.type)
×
90
        && Objects.equals(createdBy, casted.createdBy)
×
91
        && Objects.equals(createdAt, casted.createdAt)
×
92
        && Objects.equals(lockedOperations, casted.lockedOperations)
×
93
        && Objects.equals(lockType, casted.lockType);
×
94
  }
95

96
  @Override
97
  public int hashCode() {
98
    return Objects.hash(folder, id, type, createdBy, createdAt, lockedOperations, lockType);
×
99
  }
100

101
  @Override
102
  public String toString() {
103
    return "FolderLock{"
×
104
        + "folder='"
105
        + folder
106
        + '\''
107
        + ", "
108
        + "id='"
109
        + id
110
        + '\''
111
        + ", "
112
        + "type='"
113
        + type
114
        + '\''
115
        + ", "
116
        + "createdBy='"
117
        + createdBy
118
        + '\''
119
        + ", "
120
        + "createdAt='"
121
        + createdAt
122
        + '\''
123
        + ", "
124
        + "lockedOperations='"
125
        + lockedOperations
126
        + '\''
127
        + ", "
128
        + "lockType='"
129
        + lockType
130
        + '\''
131
        + "}";
132
  }
133

NEW
134
  public static class Builder {
×
135

136
    protected FolderMini folder;
137

138
    protected String id;
139

140
    protected String type;
141

142
    protected UserBase createdBy;
143

144
    protected Date createdAt;
145

146
    protected FolderLockLockedOperationsField lockedOperations;
147

148
    protected String lockType;
149

150
    public Builder folder(FolderMini folder) {
151
      this.folder = folder;
×
152
      return this;
×
153
    }
154

155
    public Builder id(String id) {
156
      this.id = id;
×
157
      return this;
×
158
    }
159

160
    public Builder type(String type) {
161
      this.type = type;
×
162
      return this;
×
163
    }
164

165
    public Builder createdBy(UserBase createdBy) {
166
      this.createdBy = createdBy;
×
167
      return this;
×
168
    }
169

170
    public Builder createdAt(Date createdAt) {
171
      this.createdAt = createdAt;
×
172
      return this;
×
173
    }
174

175
    public Builder lockedOperations(FolderLockLockedOperationsField lockedOperations) {
176
      this.lockedOperations = lockedOperations;
×
177
      return this;
×
178
    }
179

180
    public Builder lockType(String lockType) {
181
      this.lockType = lockType;
×
182
      return this;
×
183
    }
184

185
    public FolderLock build() {
186
      return new FolderLock(this);
×
187
    }
188
  }
189
}
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