• 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

40.0
/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodyLockField.java
1
package com.box.sdkgen.managers.files;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.Date;
10
import java.util.Objects;
11

12
public class UpdateFileByIdRequestBodyLockField extends SerializableObject {
13

14
  @JsonDeserialize(
15
      using =
16
          UpdateFileByIdRequestBodyLockAccessField
17
              .UpdateFileByIdRequestBodyLockAccessFieldDeserializer.class)
18
  @JsonSerialize(
19
      using =
20
          UpdateFileByIdRequestBodyLockAccessField
21
              .UpdateFileByIdRequestBodyLockAccessFieldSerializer.class)
22
  protected EnumWrapper<UpdateFileByIdRequestBodyLockAccessField> access;
23

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

29
  @JsonProperty("is_download_prevented")
30
  protected Boolean isDownloadPrevented;
31

32
  public UpdateFileByIdRequestBodyLockField() {
33
    super();
×
34
  }
×
35

36
  protected UpdateFileByIdRequestBodyLockField(Builder builder) {
37
    super();
1✔
38
    this.access = builder.access;
1✔
39
    this.expiresAt = builder.expiresAt;
1✔
40
    this.isDownloadPrevented = builder.isDownloadPrevented;
1✔
41
  }
1✔
42

43
  public EnumWrapper<UpdateFileByIdRequestBodyLockAccessField> getAccess() {
44
    return access;
1✔
45
  }
46

47
  public Date getExpiresAt() {
48
    return expiresAt;
1✔
49
  }
50

51
  public Boolean getIsDownloadPrevented() {
52
    return isDownloadPrevented;
1✔
53
  }
54

55
  @Override
56
  public boolean equals(Object o) {
57
    if (this == o) {
×
58
      return true;
×
59
    }
60
    if (o == null || getClass() != o.getClass()) {
×
61
      return false;
×
62
    }
63
    UpdateFileByIdRequestBodyLockField casted = (UpdateFileByIdRequestBodyLockField) o;
×
64
    return Objects.equals(access, casted.access)
×
65
        && Objects.equals(expiresAt, casted.expiresAt)
×
66
        && Objects.equals(isDownloadPrevented, casted.isDownloadPrevented);
×
67
  }
68

69
  @Override
70
  public int hashCode() {
71
    return Objects.hash(access, expiresAt, isDownloadPrevented);
×
72
  }
73

74
  @Override
75
  public String toString() {
76
    return "UpdateFileByIdRequestBodyLockField{"
×
77
        + "access='"
78
        + access
79
        + '\''
80
        + ", "
81
        + "expiresAt='"
82
        + expiresAt
83
        + '\''
84
        + ", "
85
        + "isDownloadPrevented='"
86
        + isDownloadPrevented
87
        + '\''
88
        + "}";
89
  }
90

91
  public static class Builder {
1✔
92

93
    protected EnumWrapper<UpdateFileByIdRequestBodyLockAccessField> access;
94

95
    protected Date expiresAt;
96

97
    protected Boolean isDownloadPrevented;
98

99
    public Builder access(UpdateFileByIdRequestBodyLockAccessField access) {
100
      this.access = new EnumWrapper<UpdateFileByIdRequestBodyLockAccessField>(access);
1✔
101
      return this;
1✔
102
    }
103

104
    public Builder access(EnumWrapper<UpdateFileByIdRequestBodyLockAccessField> access) {
UNCOV
105
      this.access = access;
×
106
      return this;
×
107
    }
108

109
    public Builder expiresAt(Date expiresAt) {
110
      this.expiresAt = expiresAt;
×
111
      return this;
×
112
    }
113

114
    public Builder isDownloadPrevented(Boolean isDownloadPrevented) {
UNCOV
115
      this.isDownloadPrevented = isDownloadPrevented;
×
116
      return this;
×
117
    }
118

119
    public UpdateFileByIdRequestBodyLockField build() {
120
      return new UpdateFileByIdRequestBodyLockField(this);
1✔
121
    }
122
  }
123
}
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