• 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/collaboratorvariable/CollaboratorVariable.java
1
package com.box.sdkgen.schemas.collaboratorvariable;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
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.List;
9
import java.util.Objects;
10

11
public class CollaboratorVariable extends SerializableObject {
12

13
  @JsonDeserialize(
14
      using = CollaboratorVariableTypeField.CollaboratorVariableTypeFieldDeserializer.class)
15
  @JsonSerialize(
16
      using = CollaboratorVariableTypeField.CollaboratorVariableTypeFieldSerializer.class)
17
  protected EnumWrapper<CollaboratorVariableTypeField> type;
18

19
  @JsonDeserialize(
20
      using =
21
          CollaboratorVariableVariableTypeField.CollaboratorVariableVariableTypeFieldDeserializer
22
              .class)
23
  @JsonSerialize(
24
      using =
25
          CollaboratorVariableVariableTypeField.CollaboratorVariableVariableTypeFieldSerializer
26
              .class)
27
  @JsonProperty("variable_type")
28
  protected EnumWrapper<CollaboratorVariableVariableTypeField> variableType;
29

30
  @JsonProperty("variable_value")
31
  protected final List<CollaboratorVariableVariableValueField> variableValue;
32

33
  public CollaboratorVariable(
34
      @JsonProperty("variable_value") List<CollaboratorVariableVariableValueField> variableValue) {
35
    super();
×
36
    this.variableValue = variableValue;
×
37
    this.type =
×
38
        new EnumWrapper<CollaboratorVariableTypeField>(CollaboratorVariableTypeField.VARIABLE);
39
    this.variableType =
×
40
        new EnumWrapper<CollaboratorVariableVariableTypeField>(
41
            CollaboratorVariableVariableTypeField.USER_LIST);
42
  }
×
43

44
  protected CollaboratorVariable(Builder builder) {
45
    super();
×
46
    this.type = builder.type;
×
47
    this.variableType = builder.variableType;
×
48
    this.variableValue = builder.variableValue;
×
49
  }
×
50

51
  public EnumWrapper<CollaboratorVariableTypeField> getType() {
52
    return type;
×
53
  }
54

55
  public EnumWrapper<CollaboratorVariableVariableTypeField> getVariableType() {
56
    return variableType;
×
57
  }
58

59
  public List<CollaboratorVariableVariableValueField> getVariableValue() {
60
    return variableValue;
×
61
  }
62

63
  @Override
64
  public boolean equals(Object o) {
65
    if (this == o) {
×
66
      return true;
×
67
    }
68
    if (o == null || getClass() != o.getClass()) {
×
69
      return false;
×
70
    }
71
    CollaboratorVariable casted = (CollaboratorVariable) o;
×
72
    return Objects.equals(type, casted.type)
×
73
        && Objects.equals(variableType, casted.variableType)
×
74
        && Objects.equals(variableValue, casted.variableValue);
×
75
  }
76

77
  @Override
78
  public int hashCode() {
79
    return Objects.hash(type, variableType, variableValue);
×
80
  }
81

82
  @Override
83
  public String toString() {
84
    return "CollaboratorVariable{"
×
85
        + "type='"
86
        + type
87
        + '\''
88
        + ", "
89
        + "variableType='"
90
        + variableType
91
        + '\''
92
        + ", "
93
        + "variableValue='"
94
        + variableValue
95
        + '\''
96
        + "}";
97
  }
98

99
  public static class Builder {
100

101
    protected EnumWrapper<CollaboratorVariableTypeField> type;
102

103
    protected EnumWrapper<CollaboratorVariableVariableTypeField> variableType;
104

105
    protected final List<CollaboratorVariableVariableValueField> variableValue;
106

NEW
107
    public Builder(List<CollaboratorVariableVariableValueField> variableValue) {
×
108
      this.variableValue = variableValue;
×
109
      this.type =
×
110
          new EnumWrapper<CollaboratorVariableTypeField>(CollaboratorVariableTypeField.VARIABLE);
111
      this.variableType =
×
112
          new EnumWrapper<CollaboratorVariableVariableTypeField>(
113
              CollaboratorVariableVariableTypeField.USER_LIST);
114
    }
×
115

116
    public Builder type(CollaboratorVariableTypeField type) {
117
      this.type = new EnumWrapper<CollaboratorVariableTypeField>(type);
×
118
      return this;
×
119
    }
120

121
    public Builder type(EnumWrapper<CollaboratorVariableTypeField> type) {
122
      this.type = type;
×
123
      return this;
×
124
    }
125

126
    public Builder variableType(CollaboratorVariableVariableTypeField variableType) {
UNCOV
127
      this.variableType = new EnumWrapper<CollaboratorVariableVariableTypeField>(variableType);
×
128
      return this;
×
129
    }
130

131
    public Builder variableType(EnumWrapper<CollaboratorVariableVariableTypeField> variableType) {
UNCOV
132
      this.variableType = variableType;
×
133
      return this;
×
134
    }
135

136
    public CollaboratorVariable build() {
137
      return new CollaboratorVariable(this);
×
138
    }
139
  }
140
}
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