• 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

22.86
/src/main/java/com/box/sdkgen/managers/uploads/UploadFileRequestBodyAttributesField.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 UploadFileRequestBodyAttributesField extends SerializableObject {
15

16
  /**
17
   * The name of the file.
18
   *
19
   * <p>File names must be unique within their parent folder. The name check is case-insensitive, so
20
   * a file named `New File` cannot be created in a parent folder that already contains a folder
21
   * named `new file`.
22
   */
23
  protected final String name;
24

25
  /** The parent folder to upload the file to. */
26
  protected final UploadFileRequestBodyAttributesParentField parent;
27

28
  /**
29
   * Defines the time the file was originally created at.
30
   *
31
   * <p>If not set, the upload time will be used.
32
   */
33
  @JsonProperty("content_created_at")
34
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
35
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
36
  protected OffsetDateTime contentCreatedAt;
37

38
  /**
39
   * Defines the time the file was last modified at.
40
   *
41
   * <p>If not set, the upload time will be used.
42
   */
43
  @JsonProperty("content_modified_at")
44
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
45
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
46
  protected OffsetDateTime contentModifiedAt;
47

48
  public UploadFileRequestBodyAttributesField(
49
      @JsonProperty("name") String name,
50
      @JsonProperty("parent") UploadFileRequestBodyAttributesParentField parent) {
51
    super();
1✔
52
    this.name = name;
1✔
53
    this.parent = parent;
1✔
54
  }
1✔
55

56
  protected UploadFileRequestBodyAttributesField(Builder builder) {
57
    super();
×
58
    this.name = builder.name;
×
59
    this.parent = builder.parent;
×
60
    this.contentCreatedAt = builder.contentCreatedAt;
×
61
    this.contentModifiedAt = builder.contentModifiedAt;
×
62
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
63
  }
×
64

65
  public String getName() {
66
    return name;
1✔
67
  }
68

69
  public UploadFileRequestBodyAttributesParentField getParent() {
70
    return parent;
1✔
71
  }
72

73
  public OffsetDateTime getContentCreatedAt() {
74
    return contentCreatedAt;
1✔
75
  }
76

77
  public OffsetDateTime getContentModifiedAt() {
78
    return contentModifiedAt;
1✔
79
  }
80

81
  @Override
82
  public boolean equals(Object o) {
83
    if (this == o) {
×
84
      return true;
×
85
    }
86
    if (o == null || getClass() != o.getClass()) {
×
87
      return false;
×
88
    }
89
    UploadFileRequestBodyAttributesField casted = (UploadFileRequestBodyAttributesField) o;
×
90
    return Objects.equals(name, casted.name)
×
91
        && Objects.equals(parent, casted.parent)
×
92
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
93
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt);
×
94
  }
95

96
  @Override
97
  public int hashCode() {
98
    return Objects.hash(name, parent, contentCreatedAt, contentModifiedAt);
×
99
  }
100

101
  @Override
102
  public String toString() {
103
    return "UploadFileRequestBodyAttributesField{"
×
104
        + "name='"
105
        + name
106
        + '\''
107
        + ", "
108
        + "parent='"
109
        + parent
110
        + '\''
111
        + ", "
112
        + "contentCreatedAt='"
113
        + contentCreatedAt
114
        + '\''
115
        + ", "
116
        + "contentModifiedAt='"
117
        + contentModifiedAt
118
        + '\''
119
        + "}";
120
  }
121

122
  public static class Builder extends NullableFieldTracker {
123

124
    protected final String name;
125

126
    protected final UploadFileRequestBodyAttributesParentField parent;
127

128
    protected OffsetDateTime contentCreatedAt;
129

130
    protected OffsetDateTime contentModifiedAt;
131

132
    public Builder(String name, UploadFileRequestBodyAttributesParentField parent) {
133
      super();
×
134
      this.name = name;
×
135
      this.parent = parent;
×
136
    }
×
137

138
    public Builder contentCreatedAt(OffsetDateTime contentCreatedAt) {
139
      this.contentCreatedAt = contentCreatedAt;
×
140
      return this;
×
141
    }
142

143
    public Builder contentModifiedAt(OffsetDateTime contentModifiedAt) {
144
      this.contentModifiedAt = contentModifiedAt;
×
145
      return this;
×
146
    }
147

148
    public UploadFileRequestBodyAttributesField build() {
149
      return new UploadFileRequestBodyAttributesField(this);
×
150
    }
151
  }
152
}
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