• 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

20.0
/src/main/java/com/box/sdkgen/managers/uploads/UploadFileVersionRequestBodyAttributesField.java
1
package com.box.sdkgen.managers.uploads;
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.fasterxml.jackson.annotation.JsonFilter;
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.time.OffsetDateTime;
11
import java.util.Objects;
12

13
@JsonFilter("nullablePropertyFilter")
14
public class UploadFileVersionRequestBodyAttributesField extends SerializableObject {
15

16
  /**
17
   * An optional new name for the file. If specified, the file will be renamed when the new version
18
   * is uploaded.
19
   */
20
  protected final String name;
21

22
  /**
23
   * Defines the time the file was last modified at.
24
   *
25
   * <p>If not set, the upload time will be used.
26
   */
27
  @JsonProperty("content_modified_at")
28
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
29
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
30
  protected OffsetDateTime contentModifiedAt;
31

32
  public UploadFileVersionRequestBodyAttributesField(@JsonProperty("name") String name) {
33
    super();
1✔
34
    this.name = name;
1✔
35
  }
1✔
36

37
  protected UploadFileVersionRequestBodyAttributesField(Builder builder) {
38
    super();
×
39
    this.name = builder.name;
×
40
    this.contentModifiedAt = builder.contentModifiedAt;
×
41
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
42
  }
×
43

44
  public String getName() {
45
    return name;
1✔
46
  }
47

48
  public OffsetDateTime getContentModifiedAt() {
49
    return contentModifiedAt;
1✔
50
  }
51

52
  @Override
53
  public boolean equals(Object o) {
54
    if (this == o) {
×
55
      return true;
×
56
    }
57
    if (o == null || getClass() != o.getClass()) {
×
58
      return false;
×
59
    }
60
    UploadFileVersionRequestBodyAttributesField casted =
×
61
        (UploadFileVersionRequestBodyAttributesField) o;
62
    return Objects.equals(name, casted.name)
×
63
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt);
×
64
  }
65

66
  @Override
67
  public int hashCode() {
68
    return Objects.hash(name, contentModifiedAt);
×
69
  }
70

71
  @Override
72
  public String toString() {
73
    return "UploadFileVersionRequestBodyAttributesField{"
×
74
        + "name='"
75
        + name
76
        + '\''
77
        + ", "
78
        + "contentModifiedAt='"
79
        + contentModifiedAt
80
        + '\''
81
        + "}";
82
  }
83

84
  public static class Builder extends NullableFieldTracker {
85

86
    protected final String name;
87

88
    protected OffsetDateTime contentModifiedAt;
89

90
    public Builder(String name) {
91
      super();
×
92
      this.name = name;
×
93
    }
×
94

95
    public Builder contentModifiedAt(OffsetDateTime contentModifiedAt) {
96
      this.contentModifiedAt = contentModifiedAt;
×
97
      return this;
×
98
    }
99

100
    public UploadFileVersionRequestBodyAttributesField build() {
101
      return new UploadFileVersionRequestBodyAttributesField(this);
×
102
    }
103
  }
104
}
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