• 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

52.27
/src/main/java/com/box/sdkgen/managers/metadatatemplates/CreateMetadataTemplateRequestBody.java
1
package com.box.sdkgen.managers.metadatatemplates;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import java.util.List;
6
import java.util.Objects;
7

8
public class CreateMetadataTemplateRequestBody extends SerializableObject {
9

10
  protected final String scope;
11

12
  protected String templateKey;
13

14
  protected final String displayName;
15

16
  protected Boolean hidden;
17

18
  protected List<CreateMetadataTemplateRequestBodyFieldsField> fields;
19

20
  protected Boolean copyInstanceOnItemCopy;
21

22
  public CreateMetadataTemplateRequestBody(
23
      @JsonProperty("scope") String scope, @JsonProperty("displayName") String displayName) {
24
    super();
×
25
    this.scope = scope;
×
26
    this.displayName = displayName;
×
27
  }
×
28

29
  protected CreateMetadataTemplateRequestBody(Builder builder) {
30
    super();
1✔
31
    this.scope = builder.scope;
1✔
32
    this.templateKey = builder.templateKey;
1✔
33
    this.displayName = builder.displayName;
1✔
34
    this.hidden = builder.hidden;
1✔
35
    this.fields = builder.fields;
1✔
36
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
1✔
37
  }
1✔
38

39
  public String getScope() {
40
    return scope;
1✔
41
  }
42

43
  public String getTemplateKey() {
44
    return templateKey;
1✔
45
  }
46

47
  public String getDisplayName() {
48
    return displayName;
1✔
49
  }
50

51
  public Boolean getHidden() {
52
    return hidden;
1✔
53
  }
54

55
  public List<CreateMetadataTemplateRequestBodyFieldsField> getFields() {
56
    return fields;
1✔
57
  }
58

59
  public Boolean getCopyInstanceOnItemCopy() {
60
    return copyInstanceOnItemCopy;
1✔
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
    CreateMetadataTemplateRequestBody casted = (CreateMetadataTemplateRequestBody) o;
×
72
    return Objects.equals(scope, casted.scope)
×
73
        && Objects.equals(templateKey, casted.templateKey)
×
74
        && Objects.equals(displayName, casted.displayName)
×
75
        && Objects.equals(hidden, casted.hidden)
×
76
        && Objects.equals(fields, casted.fields)
×
77
        && Objects.equals(copyInstanceOnItemCopy, casted.copyInstanceOnItemCopy);
×
78
  }
79

80
  @Override
81
  public int hashCode() {
82
    return Objects.hash(scope, templateKey, displayName, hidden, fields, copyInstanceOnItemCopy);
×
83
  }
84

85
  @Override
86
  public String toString() {
87
    return "CreateMetadataTemplateRequestBody{"
×
88
        + "scope='"
89
        + scope
90
        + '\''
91
        + ", "
92
        + "templateKey='"
93
        + templateKey
94
        + '\''
95
        + ", "
96
        + "displayName='"
97
        + displayName
98
        + '\''
99
        + ", "
100
        + "hidden='"
101
        + hidden
102
        + '\''
103
        + ", "
104
        + "fields='"
105
        + fields
106
        + '\''
107
        + ", "
108
        + "copyInstanceOnItemCopy='"
109
        + copyInstanceOnItemCopy
110
        + '\''
111
        + "}";
112
  }
113

114
  public static class Builder {
115

116
    protected final String scope;
117

118
    protected String templateKey;
119

120
    protected final String displayName;
121

122
    protected Boolean hidden;
123

124
    protected List<CreateMetadataTemplateRequestBodyFieldsField> fields;
125

126
    protected Boolean copyInstanceOnItemCopy;
127

128
    public Builder(String scope, String displayName) {
1✔
129
      this.scope = scope;
1✔
130
      this.displayName = displayName;
1✔
131
    }
1✔
132

133
    public Builder templateKey(String templateKey) {
134
      this.templateKey = templateKey;
1✔
135
      return this;
1✔
136
    }
137

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

143
    public Builder fields(List<CreateMetadataTemplateRequestBodyFieldsField> fields) {
144
      this.fields = fields;
1✔
145
      return this;
1✔
146
    }
147

148
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
UNCOV
149
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
150
      return this;
×
151
    }
152

153
    public CreateMetadataTemplateRequestBody build() {
154
      return new CreateMetadataTemplateRequestBody(this);
1✔
155
    }
156
  }
157
}
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