• 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

13.33
/src/main/java/com/box/sdkgen/schemas/workflow/WorkflowFlowsField.java
1
package com.box.sdkgen.schemas.workflow;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.userbase.UserBase;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
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.util.Date;
11
import java.util.List;
12
import java.util.Objects;
13

14
public class WorkflowFlowsField extends SerializableObject {
15

16
  protected String id;
17

18
  @JsonDeserialize(using = WorkflowFlowsTypeField.WorkflowFlowsTypeFieldDeserializer.class)
19
  @JsonSerialize(using = WorkflowFlowsTypeField.WorkflowFlowsTypeFieldSerializer.class)
20
  protected EnumWrapper<WorkflowFlowsTypeField> type;
21

22
  protected WorkflowFlowsTriggerField trigger;
23

24
  protected List<WorkflowFlowsOutcomesField> outcomes;
25

26
  @JsonProperty("created_at")
27
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
28
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
29
  protected Date createdAt;
30

31
  @JsonProperty("created_by")
32
  protected UserBase createdBy;
33

34
  public WorkflowFlowsField() {
35
    super();
1✔
36
  }
1✔
37

38
  protected WorkflowFlowsField(Builder builder) {
39
    super();
×
40
    this.id = builder.id;
×
41
    this.type = builder.type;
×
42
    this.trigger = builder.trigger;
×
43
    this.outcomes = builder.outcomes;
×
44
    this.createdAt = builder.createdAt;
×
45
    this.createdBy = builder.createdBy;
×
46
  }
×
47

48
  public String getId() {
49
    return id;
1✔
50
  }
51

52
  public EnumWrapper<WorkflowFlowsTypeField> getType() {
53
    return type;
1✔
54
  }
55

56
  public WorkflowFlowsTriggerField getTrigger() {
57
    return trigger;
1✔
58
  }
59

60
  public List<WorkflowFlowsOutcomesField> getOutcomes() {
61
    return outcomes;
1✔
62
  }
63

64
  public Date getCreatedAt() {
65
    return createdAt;
×
66
  }
67

68
  public UserBase getCreatedBy() {
69
    return createdBy;
×
70
  }
71

72
  @Override
73
  public boolean equals(Object o) {
74
    if (this == o) {
×
75
      return true;
×
76
    }
77
    if (o == null || getClass() != o.getClass()) {
×
78
      return false;
×
79
    }
80
    WorkflowFlowsField casted = (WorkflowFlowsField) o;
×
81
    return Objects.equals(id, casted.id)
×
82
        && Objects.equals(type, casted.type)
×
83
        && Objects.equals(trigger, casted.trigger)
×
84
        && Objects.equals(outcomes, casted.outcomes)
×
85
        && Objects.equals(createdAt, casted.createdAt)
×
86
        && Objects.equals(createdBy, casted.createdBy);
×
87
  }
88

89
  @Override
90
  public int hashCode() {
91
    return Objects.hash(id, type, trigger, outcomes, createdAt, createdBy);
×
92
  }
93

94
  @Override
95
  public String toString() {
96
    return "WorkflowFlowsField{"
×
97
        + "id='"
98
        + id
99
        + '\''
100
        + ", "
101
        + "type='"
102
        + type
103
        + '\''
104
        + ", "
105
        + "trigger='"
106
        + trigger
107
        + '\''
108
        + ", "
109
        + "outcomes='"
110
        + outcomes
111
        + '\''
112
        + ", "
113
        + "createdAt='"
114
        + createdAt
115
        + '\''
116
        + ", "
117
        + "createdBy='"
118
        + createdBy
119
        + '\''
120
        + "}";
121
  }
122

NEW
123
  public static class Builder {
×
124

125
    protected String id;
126

127
    protected EnumWrapper<WorkflowFlowsTypeField> type;
128

129
    protected WorkflowFlowsTriggerField trigger;
130

131
    protected List<WorkflowFlowsOutcomesField> outcomes;
132

133
    protected Date createdAt;
134

135
    protected UserBase createdBy;
136

137
    public Builder id(String id) {
138
      this.id = id;
×
139
      return this;
×
140
    }
141

142
    public Builder type(WorkflowFlowsTypeField type) {
143
      this.type = new EnumWrapper<WorkflowFlowsTypeField>(type);
×
144
      return this;
×
145
    }
146

147
    public Builder type(EnumWrapper<WorkflowFlowsTypeField> type) {
148
      this.type = type;
×
149
      return this;
×
150
    }
151

152
    public Builder trigger(WorkflowFlowsTriggerField trigger) {
153
      this.trigger = trigger;
×
154
      return this;
×
155
    }
156

157
    public Builder outcomes(List<WorkflowFlowsOutcomesField> outcomes) {
158
      this.outcomes = outcomes;
×
159
      return this;
×
160
    }
161

162
    public Builder createdAt(Date createdAt) {
163
      this.createdAt = createdAt;
×
164
      return this;
×
165
    }
166

167
    public Builder createdBy(UserBase createdBy) {
168
      this.createdBy = createdBy;
×
169
      return this;
×
170
    }
171

172
    public WorkflowFlowsField build() {
173
      return new WorkflowFlowsField(this);
×
174
    }
175
  }
176
}
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