• 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

23.53
/src/main/java/com/box/sdkgen/managers/uploads/UploadFileRequestBodyAttributesField.java
1
package com.box.sdkgen.managers.uploads;
2

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

11
public class UploadFileRequestBodyAttributesField extends SerializableObject {
12

13
  protected final String name;
14

15
  protected final UploadFileRequestBodyAttributesParentField parent;
16

17
  @JsonProperty("content_created_at")
18
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
19
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
20
  protected Date contentCreatedAt;
21

22
  @JsonProperty("content_modified_at")
23
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
24
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
25
  protected Date contentModifiedAt;
26

27
  public UploadFileRequestBodyAttributesField(
28
      @JsonProperty("name") String name,
29
      @JsonProperty("parent") UploadFileRequestBodyAttributesParentField parent) {
30
    super();
1✔
31
    this.name = name;
1✔
32
    this.parent = parent;
1✔
33
  }
1✔
34

35
  protected UploadFileRequestBodyAttributesField(Builder builder) {
UNCOV
36
    super();
×
37
    this.name = builder.name;
×
38
    this.parent = builder.parent;
×
39
    this.contentCreatedAt = builder.contentCreatedAt;
×
40
    this.contentModifiedAt = builder.contentModifiedAt;
×
41
  }
×
42

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

47
  public UploadFileRequestBodyAttributesParentField getParent() {
48
    return parent;
1✔
49
  }
50

51
  public Date getContentCreatedAt() {
52
    return contentCreatedAt;
1✔
53
  }
54

55
  public Date getContentModifiedAt() {
56
    return contentModifiedAt;
1✔
57
  }
58

59
  @Override
60
  public boolean equals(Object o) {
61
    if (this == o) {
×
62
      return true;
×
63
    }
64
    if (o == null || getClass() != o.getClass()) {
×
65
      return false;
×
66
    }
67
    UploadFileRequestBodyAttributesField casted = (UploadFileRequestBodyAttributesField) o;
×
68
    return Objects.equals(name, casted.name)
×
69
        && Objects.equals(parent, casted.parent)
×
70
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
71
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt);
×
72
  }
73

74
  @Override
75
  public int hashCode() {
76
    return Objects.hash(name, parent, contentCreatedAt, contentModifiedAt);
×
77
  }
78

79
  @Override
80
  public String toString() {
81
    return "UploadFileRequestBodyAttributesField{"
×
82
        + "name='"
83
        + name
84
        + '\''
85
        + ", "
86
        + "parent='"
87
        + parent
88
        + '\''
89
        + ", "
90
        + "contentCreatedAt='"
91
        + contentCreatedAt
92
        + '\''
93
        + ", "
94
        + "contentModifiedAt='"
95
        + contentModifiedAt
96
        + '\''
97
        + "}";
98
  }
99

100
  public static class Builder {
101

102
    protected final String name;
103

104
    protected final UploadFileRequestBodyAttributesParentField parent;
105

106
    protected Date contentCreatedAt;
107

108
    protected Date contentModifiedAt;
109

NEW
110
    public Builder(String name, UploadFileRequestBodyAttributesParentField parent) {
×
111
      this.name = name;
×
112
      this.parent = parent;
×
113
    }
×
114

115
    public Builder contentCreatedAt(Date contentCreatedAt) {
116
      this.contentCreatedAt = contentCreatedAt;
×
117
      return this;
×
118
    }
119

120
    public Builder contentModifiedAt(Date contentModifiedAt) {
121
      this.contentModifiedAt = contentModifiedAt;
×
122
      return this;
×
123
    }
124

125
    public UploadFileRequestBodyAttributesField build() {
126
      return new UploadFileRequestBodyAttributesField(this);
×
127
    }
128
  }
129
}
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