• 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

3.85
/src/main/java/com/box/sdkgen/schemas/filefull/FileFullLockField.java
1
package com.box.sdkgen.schemas.filefull;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.usermini.UserMini;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
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 FileFullLockField extends SerializableObject {
14

15
  protected String id;
16

17
  @JsonDeserialize(using = FileFullLockTypeField.FileFullLockTypeFieldDeserializer.class)
18
  @JsonSerialize(using = FileFullLockTypeField.FileFullLockTypeFieldSerializer.class)
19
  protected EnumWrapper<FileFullLockTypeField> type;
20

21
  @JsonProperty("created_by")
22
  protected UserMini 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("expired_at")
30
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
31
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
32
  protected Date expiredAt;
33

34
  @JsonProperty("is_download_prevented")
35
  protected Boolean isDownloadPrevented;
36

37
  @JsonDeserialize(using = FileFullLockAppTypeField.FileFullLockAppTypeFieldDeserializer.class)
38
  @JsonSerialize(using = FileFullLockAppTypeField.FileFullLockAppTypeFieldSerializer.class)
39
  @JsonProperty("app_type")
40
  protected EnumWrapper<FileFullLockAppTypeField> appType;
41

42
  public FileFullLockField() {
43
    super();
1✔
44
  }
1✔
45

46
  protected FileFullLockField(Builder builder) {
47
    super();
×
48
    this.id = builder.id;
×
49
    this.type = builder.type;
×
50
    this.createdBy = builder.createdBy;
×
51
    this.createdAt = builder.createdAt;
×
52
    this.expiredAt = builder.expiredAt;
×
53
    this.isDownloadPrevented = builder.isDownloadPrevented;
×
54
    this.appType = builder.appType;
×
55
  }
×
56

57
  public String getId() {
58
    return id;
×
59
  }
60

61
  public EnumWrapper<FileFullLockTypeField> getType() {
62
    return type;
×
63
  }
64

65
  public UserMini getCreatedBy() {
66
    return createdBy;
×
67
  }
68

69
  public Date getCreatedAt() {
70
    return createdAt;
×
71
  }
72

73
  public Date getExpiredAt() {
74
    return expiredAt;
×
75
  }
76

77
  public Boolean getIsDownloadPrevented() {
78
    return isDownloadPrevented;
×
79
  }
80

81
  public EnumWrapper<FileFullLockAppTypeField> getAppType() {
82
    return appType;
×
83
  }
84

85
  @Override
86
  public boolean equals(Object o) {
87
    if (this == o) {
×
88
      return true;
×
89
    }
90
    if (o == null || getClass() != o.getClass()) {
×
91
      return false;
×
92
    }
93
    FileFullLockField casted = (FileFullLockField) o;
×
94
    return Objects.equals(id, casted.id)
×
95
        && Objects.equals(type, casted.type)
×
96
        && Objects.equals(createdBy, casted.createdBy)
×
97
        && Objects.equals(createdAt, casted.createdAt)
×
98
        && Objects.equals(expiredAt, casted.expiredAt)
×
99
        && Objects.equals(isDownloadPrevented, casted.isDownloadPrevented)
×
100
        && Objects.equals(appType, casted.appType);
×
101
  }
102

103
  @Override
104
  public int hashCode() {
105
    return Objects.hash(id, type, createdBy, createdAt, expiredAt, isDownloadPrevented, appType);
×
106
  }
107

108
  @Override
109
  public String toString() {
110
    return "FileFullLockField{"
×
111
        + "id='"
112
        + id
113
        + '\''
114
        + ", "
115
        + "type='"
116
        + type
117
        + '\''
118
        + ", "
119
        + "createdBy='"
120
        + createdBy
121
        + '\''
122
        + ", "
123
        + "createdAt='"
124
        + createdAt
125
        + '\''
126
        + ", "
127
        + "expiredAt='"
128
        + expiredAt
129
        + '\''
130
        + ", "
131
        + "isDownloadPrevented='"
132
        + isDownloadPrevented
133
        + '\''
134
        + ", "
135
        + "appType='"
136
        + appType
137
        + '\''
138
        + "}";
139
  }
140

NEW
141
  public static class Builder {
×
142

143
    protected String id;
144

145
    protected EnumWrapper<FileFullLockTypeField> type;
146

147
    protected UserMini createdBy;
148

149
    protected Date createdAt;
150

151
    protected Date expiredAt;
152

153
    protected Boolean isDownloadPrevented;
154

155
    protected EnumWrapper<FileFullLockAppTypeField> appType;
156

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

162
    public Builder type(FileFullLockTypeField type) {
163
      this.type = new EnumWrapper<FileFullLockTypeField>(type);
×
164
      return this;
×
165
    }
166

167
    public Builder type(EnumWrapper<FileFullLockTypeField> type) {
168
      this.type = type;
×
169
      return this;
×
170
    }
171

172
    public Builder createdBy(UserMini createdBy) {
173
      this.createdBy = createdBy;
×
174
      return this;
×
175
    }
176

177
    public Builder createdAt(Date createdAt) {
178
      this.createdAt = createdAt;
×
179
      return this;
×
180
    }
181

182
    public Builder expiredAt(Date expiredAt) {
183
      this.expiredAt = expiredAt;
×
184
      return this;
×
185
    }
186

187
    public Builder isDownloadPrevented(Boolean isDownloadPrevented) {
188
      this.isDownloadPrevented = isDownloadPrevented;
×
189
      return this;
×
190
    }
191

192
    public Builder appType(FileFullLockAppTypeField appType) {
193
      this.appType = new EnumWrapper<FileFullLockAppTypeField>(appType);
×
194
      return this;
×
195
    }
196

197
    public Builder appType(EnumWrapper<FileFullLockAppTypeField> appType) {
198
      this.appType = appType;
×
199
      return this;
×
200
    }
201

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