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

box / box-java-sdk-gen / #155

30 May 2025 01:03PM UTC coverage: 35.646% (+0.3%) from 35.311%
#155

push

github

web-flow
fix: Fix downscope token to use `retrieveToken` method for token retrieval (box/box-codegen#731) (#320)

4 of 4 new or added lines in 4 files covered. (100.0%)

2952 existing lines in 99 files now uncovered.

15628 of 43842 relevant lines covered (35.65%)

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() {
UNCOV
33
    super();
×
UNCOV
34
  }
×
35

36
  protected UpdateFileByIdRequestBodyLockField(UpdateFileByIdRequestBodyLockFieldBuilder 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) {
×
UNCOV
58
      return true;
×
59
    }
60
    if (o == null || getClass() != o.getClass()) {
×
61
      return false;
×
62
    }
UNCOV
63
    UpdateFileByIdRequestBodyLockField casted = (UpdateFileByIdRequestBodyLockField) o;
×
UNCOV
64
    return Objects.equals(access, casted.access)
×
UNCOV
65
        && Objects.equals(expiresAt, casted.expiresAt)
×
UNCOV
66
        && Objects.equals(isDownloadPrevented, casted.isDownloadPrevented);
×
67
  }
68

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

74
  @Override
75
  public String toString() {
UNCOV
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 UpdateFileByIdRequestBodyLockFieldBuilder {
1✔
92

93
    protected EnumWrapper<UpdateFileByIdRequestBodyLockAccessField> access;
94

95
    protected Date expiresAt;
96

97
    protected Boolean isDownloadPrevented;
98

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

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

111
    public UpdateFileByIdRequestBodyLockFieldBuilder expiresAt(Date expiresAt) {
UNCOV
112
      this.expiresAt = expiresAt;
×
UNCOV
113
      return this;
×
114
    }
115

116
    public UpdateFileByIdRequestBodyLockFieldBuilder isDownloadPrevented(
117
        Boolean isDownloadPrevented) {
UNCOV
118
      this.isDownloadPrevented = isDownloadPrevented;
×
UNCOV
119
      return this;
×
120
    }
121

122
    public UpdateFileByIdRequestBodyLockField build() {
123
      return new UpdateFileByIdRequestBodyLockField(this);
1✔
124
    }
125
  }
126
}
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