• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk-gen / #290

24 Jun 2025 01:20PM UTC coverage: 35.757% (+0.1%) from 35.632%
#290

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11777 existing lines in 624 files now uncovered.

16984 of 47499 relevant lines covered (35.76%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

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

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

10
@JsonFilter("nullablePropertyFilter")
11
public class CreateMetadataTemplateRequestBody extends SerializableObject {
12

13
  protected final String scope;
14

15
  protected String templateKey;
16

17
  protected final String displayName;
18

19
  protected Boolean hidden;
20

21
  protected List<CreateMetadataTemplateRequestBodyFieldsField> fields;
22

23
  protected Boolean copyInstanceOnItemCopy;
24

25
  public CreateMetadataTemplateRequestBody(
26
      @JsonProperty("scope") String scope, @JsonProperty("displayName") String displayName) {
27
    super();
×
UNCOV
28
    this.scope = scope;
×
UNCOV
29
    this.displayName = displayName;
×
UNCOV
30
  }
×
31

32
  protected CreateMetadataTemplateRequestBody(Builder builder) {
33
    super();
1✔
34
    this.scope = builder.scope;
1✔
35
    this.templateKey = builder.templateKey;
1✔
36
    this.displayName = builder.displayName;
1✔
37
    this.hidden = builder.hidden;
1✔
38
    this.fields = builder.fields;
1✔
39
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
1✔
40
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
41
  }
1✔
42

43
  public String getScope() {
44
    return scope;
1✔
45
  }
46

47
  public String getTemplateKey() {
48
    return templateKey;
1✔
49
  }
50

51
  public String getDisplayName() {
52
    return displayName;
1✔
53
  }
54

55
  public Boolean getHidden() {
56
    return hidden;
1✔
57
  }
58

59
  public List<CreateMetadataTemplateRequestBodyFieldsField> getFields() {
60
    return fields;
1✔
61
  }
62

63
  public Boolean getCopyInstanceOnItemCopy() {
64
    return copyInstanceOnItemCopy;
1✔
65
  }
66

67
  @Override
68
  public boolean equals(Object o) {
69
    if (this == o) {
×
UNCOV
70
      return true;
×
71
    }
72
    if (o == null || getClass() != o.getClass()) {
×
73
      return false;
×
74
    }
75
    CreateMetadataTemplateRequestBody casted = (CreateMetadataTemplateRequestBody) o;
×
76
    return Objects.equals(scope, casted.scope)
×
77
        && Objects.equals(templateKey, casted.templateKey)
×
UNCOV
78
        && Objects.equals(displayName, casted.displayName)
×
UNCOV
79
        && Objects.equals(hidden, casted.hidden)
×
UNCOV
80
        && Objects.equals(fields, casted.fields)
×
UNCOV
81
        && Objects.equals(copyInstanceOnItemCopy, casted.copyInstanceOnItemCopy);
×
82
  }
83

84
  @Override
85
  public int hashCode() {
UNCOV
86
    return Objects.hash(scope, templateKey, displayName, hidden, fields, copyInstanceOnItemCopy);
×
87
  }
88

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

118
  public static class Builder extends NullableFieldTracker {
119

120
    protected final String scope;
121

122
    protected String templateKey;
123

124
    protected final String displayName;
125

126
    protected Boolean hidden;
127

128
    protected List<CreateMetadataTemplateRequestBodyFieldsField> fields;
129

130
    protected Boolean copyInstanceOnItemCopy;
131

132
    public Builder(String scope, String displayName) {
133
      super();
1✔
134
      this.scope = scope;
1✔
135
      this.displayName = displayName;
1✔
136
    }
1✔
137

138
    public Builder templateKey(String templateKey) {
139
      this.templateKey = templateKey;
1✔
140
      return this;
1✔
141
    }
142

143
    public Builder hidden(Boolean hidden) {
UNCOV
144
      this.hidden = hidden;
×
UNCOV
145
      return this;
×
146
    }
147

148
    public Builder fields(List<CreateMetadataTemplateRequestBodyFieldsField> fields) {
149
      this.fields = fields;
1✔
150
      return this;
1✔
151
    }
152

153
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
UNCOV
154
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
UNCOV
155
      return this;
×
156
    }
157

158
    public CreateMetadataTemplateRequestBody build() {
159
      return new CreateMetadataTemplateRequestBody(this);
1✔
160
    }
161
  }
162
}
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