• 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

0.0
/src/main/java/com/box/sdkgen/schemas/outcome/Outcome.java
1
package com.box.sdkgen.schemas.outcome;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.collaboratorvariable.CollaboratorVariable;
5
import com.box.sdkgen.schemas.completionrulevariable.CompletionRuleVariable;
6
import com.box.sdkgen.schemas.rolevariable.RoleVariable;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import java.util.Objects;
9

10
public class Outcome extends SerializableObject {
11

12
  protected final String id;
13

14
  protected CollaboratorVariable collaborators;
15

16
  @JsonProperty("completion_rule")
17
  protected CompletionRuleVariable completionRule;
18

19
  @JsonProperty("file_collaborator_role")
20
  protected RoleVariable fileCollaboratorRole;
21

22
  @JsonProperty("task_collaborators")
23
  protected CollaboratorVariable taskCollaborators;
24

25
  protected RoleVariable role;
26

27
  public Outcome(@JsonProperty("id") String id) {
28
    super();
×
29
    this.id = id;
×
30
  }
×
31

32
  protected Outcome(Builder builder) {
33
    super();
×
34
    this.id = builder.id;
×
35
    this.collaborators = builder.collaborators;
×
36
    this.completionRule = builder.completionRule;
×
37
    this.fileCollaboratorRole = builder.fileCollaboratorRole;
×
38
    this.taskCollaborators = builder.taskCollaborators;
×
39
    this.role = builder.role;
×
40
  }
×
41

42
  public String getId() {
43
    return id;
×
44
  }
45

46
  public CollaboratorVariable getCollaborators() {
47
    return collaborators;
×
48
  }
49

50
  public CompletionRuleVariable getCompletionRule() {
51
    return completionRule;
×
52
  }
53

54
  public RoleVariable getFileCollaboratorRole() {
55
    return fileCollaboratorRole;
×
56
  }
57

58
  public CollaboratorVariable getTaskCollaborators() {
59
    return taskCollaborators;
×
60
  }
61

62
  public RoleVariable getRole() {
63
    return role;
×
64
  }
65

66
  @Override
67
  public boolean equals(Object o) {
68
    if (this == o) {
×
69
      return true;
×
70
    }
71
    if (o == null || getClass() != o.getClass()) {
×
72
      return false;
×
73
    }
74
    Outcome casted = (Outcome) o;
×
75
    return Objects.equals(id, casted.id)
×
76
        && Objects.equals(collaborators, casted.collaborators)
×
77
        && Objects.equals(completionRule, casted.completionRule)
×
78
        && Objects.equals(fileCollaboratorRole, casted.fileCollaboratorRole)
×
79
        && Objects.equals(taskCollaborators, casted.taskCollaborators)
×
80
        && Objects.equals(role, casted.role);
×
81
  }
82

83
  @Override
84
  public int hashCode() {
85
    return Objects.hash(
×
86
        id, collaborators, completionRule, fileCollaboratorRole, taskCollaborators, role);
87
  }
88

89
  @Override
90
  public String toString() {
91
    return "Outcome{"
×
92
        + "id='"
93
        + id
94
        + '\''
95
        + ", "
96
        + "collaborators='"
97
        + collaborators
98
        + '\''
99
        + ", "
100
        + "completionRule='"
101
        + completionRule
102
        + '\''
103
        + ", "
104
        + "fileCollaboratorRole='"
105
        + fileCollaboratorRole
106
        + '\''
107
        + ", "
108
        + "taskCollaborators='"
109
        + taskCollaborators
110
        + '\''
111
        + ", "
112
        + "role='"
113
        + role
114
        + '\''
115
        + "}";
116
  }
117

118
  public static class Builder {
119

120
    protected final String id;
121

122
    protected CollaboratorVariable collaborators;
123

124
    protected CompletionRuleVariable completionRule;
125

126
    protected RoleVariable fileCollaboratorRole;
127

128
    protected CollaboratorVariable taskCollaborators;
129

130
    protected RoleVariable role;
131

NEW
132
    public Builder(String id) {
×
133
      this.id = id;
×
134
    }
×
135

136
    public Builder collaborators(CollaboratorVariable collaborators) {
137
      this.collaborators = collaborators;
×
138
      return this;
×
139
    }
140

141
    public Builder completionRule(CompletionRuleVariable completionRule) {
142
      this.completionRule = completionRule;
×
143
      return this;
×
144
    }
145

146
    public Builder fileCollaboratorRole(RoleVariable fileCollaboratorRole) {
147
      this.fileCollaboratorRole = fileCollaboratorRole;
×
148
      return this;
×
149
    }
150

151
    public Builder taskCollaborators(CollaboratorVariable taskCollaborators) {
152
      this.taskCollaborators = taskCollaborators;
×
153
      return this;
×
154
    }
155

156
    public Builder role(RoleVariable role) {
157
      this.role = role;
×
158
      return this;
×
159
    }
160

161
    public Outcome build() {
162
      return new Outcome(this);
×
163
    }
164
  }
165
}
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