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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

44.26
/src/main/java/com/box/sdkgen/managers/metadatatemplates/UpdateMetadataTemplateRequestBody.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.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonFilter;
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.List;
11
import java.util.Map;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class UpdateMetadataTemplateRequestBody extends SerializableObject {
16

17
  /**
18
   * The type of change to perform on the template. Some of these are hazardous as they will change
19
   * existing templates.
20
   */
21
  @JsonDeserialize(
22
      using =
23
          UpdateMetadataTemplateRequestBodyOpField
24
              .UpdateMetadataTemplateRequestBodyOpFieldDeserializer.class)
25
  @JsonSerialize(
26
      using =
27
          UpdateMetadataTemplateRequestBodyOpField
28
              .UpdateMetadataTemplateRequestBodyOpFieldSerializer.class)
29
  protected final EnumWrapper<UpdateMetadataTemplateRequestBodyOpField> op;
30

31
  /** The data for the operation. This will vary depending on the operation being performed. */
32
  protected Map<String, Object> data;
33

34
  /**
35
   * For operations that affect a single field this defines the key of the field that is affected.
36
   */
37
  protected String fieldKey;
38

39
  /**
40
   * For operations that affect multiple fields this defines the keys of the fields that are
41
   * affected.
42
   */
43
  protected List<String> fieldKeys;
44

45
  /**
46
   * For operations that affect a single `enum` option this defines the key of the option that is
47
   * affected.
48
   */
49
  protected String enumOptionKey;
50

51
  /**
52
   * For operations that affect multiple `enum` options this defines the keys of the options that
53
   * are affected.
54
   */
55
  protected List<String> enumOptionKeys;
56

57
  /**
58
   * For operations that affect a single multi select option this defines the key of the option that
59
   * is affected.
60
   */
61
  protected String multiSelectOptionKey;
62

63
  /**
64
   * For operations that affect multiple multi select options this defines the keys of the options
65
   * that are affected.
66
   */
67
  protected List<String> multiSelectOptionKeys;
68

69
  public UpdateMetadataTemplateRequestBody(UpdateMetadataTemplateRequestBodyOpField op) {
70
    super();
×
71
    this.op = new EnumWrapper<UpdateMetadataTemplateRequestBodyOpField>(op);
×
72
  }
×
73

74
  public UpdateMetadataTemplateRequestBody(
75
      @JsonProperty("op") EnumWrapper<UpdateMetadataTemplateRequestBodyOpField> op) {
76
    super();
×
77
    this.op = op;
×
78
  }
×
79

80
  protected UpdateMetadataTemplateRequestBody(Builder builder) {
81
    super();
1✔
82
    this.op = builder.op;
1✔
83
    this.data = builder.data;
1✔
84
    this.fieldKey = builder.fieldKey;
1✔
85
    this.fieldKeys = builder.fieldKeys;
1✔
86
    this.enumOptionKey = builder.enumOptionKey;
1✔
87
    this.enumOptionKeys = builder.enumOptionKeys;
1✔
88
    this.multiSelectOptionKey = builder.multiSelectOptionKey;
1✔
89
    this.multiSelectOptionKeys = builder.multiSelectOptionKeys;
1✔
90
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
91
  }
1✔
92

93
  public EnumWrapper<UpdateMetadataTemplateRequestBodyOpField> getOp() {
94
    return op;
1✔
95
  }
96

97
  public Map<String, Object> getData() {
98
    return data;
1✔
99
  }
100

101
  public String getFieldKey() {
102
    return fieldKey;
1✔
103
  }
104

105
  public List<String> getFieldKeys() {
106
    return fieldKeys;
1✔
107
  }
108

109
  public String getEnumOptionKey() {
110
    return enumOptionKey;
1✔
111
  }
112

113
  public List<String> getEnumOptionKeys() {
114
    return enumOptionKeys;
1✔
115
  }
116

117
  public String getMultiSelectOptionKey() {
118
    return multiSelectOptionKey;
1✔
119
  }
120

121
  public List<String> getMultiSelectOptionKeys() {
122
    return multiSelectOptionKeys;
1✔
123
  }
124

125
  @Override
126
  public boolean equals(Object o) {
127
    if (this == o) {
×
128
      return true;
×
129
    }
130
    if (o == null || getClass() != o.getClass()) {
×
131
      return false;
×
132
    }
133
    UpdateMetadataTemplateRequestBody casted = (UpdateMetadataTemplateRequestBody) o;
×
134
    return Objects.equals(op, casted.op)
×
135
        && Objects.equals(data, casted.data)
×
136
        && Objects.equals(fieldKey, casted.fieldKey)
×
137
        && Objects.equals(fieldKeys, casted.fieldKeys)
×
138
        && Objects.equals(enumOptionKey, casted.enumOptionKey)
×
139
        && Objects.equals(enumOptionKeys, casted.enumOptionKeys)
×
140
        && Objects.equals(multiSelectOptionKey, casted.multiSelectOptionKey)
×
141
        && Objects.equals(multiSelectOptionKeys, casted.multiSelectOptionKeys);
×
142
  }
143

144
  @Override
145
  public int hashCode() {
146
    return Objects.hash(
×
147
        op,
148
        data,
149
        fieldKey,
150
        fieldKeys,
151
        enumOptionKey,
152
        enumOptionKeys,
153
        multiSelectOptionKey,
154
        multiSelectOptionKeys);
155
  }
156

157
  @Override
158
  public String toString() {
159
    return "UpdateMetadataTemplateRequestBody{"
×
160
        + "op='"
161
        + op
162
        + '\''
163
        + ", "
164
        + "data='"
165
        + data
166
        + '\''
167
        + ", "
168
        + "fieldKey='"
169
        + fieldKey
170
        + '\''
171
        + ", "
172
        + "fieldKeys='"
173
        + fieldKeys
174
        + '\''
175
        + ", "
176
        + "enumOptionKey='"
177
        + enumOptionKey
178
        + '\''
179
        + ", "
180
        + "enumOptionKeys='"
181
        + enumOptionKeys
182
        + '\''
183
        + ", "
184
        + "multiSelectOptionKey='"
185
        + multiSelectOptionKey
186
        + '\''
187
        + ", "
188
        + "multiSelectOptionKeys='"
189
        + multiSelectOptionKeys
190
        + '\''
191
        + "}";
192
  }
193

194
  public static class Builder extends NullableFieldTracker {
195

196
    protected final EnumWrapper<UpdateMetadataTemplateRequestBodyOpField> op;
197

198
    protected Map<String, Object> data;
199

200
    protected String fieldKey;
201

202
    protected List<String> fieldKeys;
203

204
    protected String enumOptionKey;
205

206
    protected List<String> enumOptionKeys;
207

208
    protected String multiSelectOptionKey;
209

210
    protected List<String> multiSelectOptionKeys;
211

212
    public Builder(UpdateMetadataTemplateRequestBodyOpField op) {
213
      super();
1✔
214
      this.op = new EnumWrapper<UpdateMetadataTemplateRequestBodyOpField>(op);
1✔
215
    }
1✔
216

217
    public Builder(EnumWrapper<UpdateMetadataTemplateRequestBodyOpField> op) {
218
      super();
×
219
      this.op = op;
×
220
    }
×
221

222
    public Builder data(Map<String, Object> data) {
223
      this.data = data;
1✔
224
      return this;
1✔
225
    }
226

227
    public Builder fieldKey(String fieldKey) {
228
      this.fieldKey = fieldKey;
1✔
229
      return this;
1✔
230
    }
231

232
    public Builder fieldKeys(List<String> fieldKeys) {
233
      this.fieldKeys = fieldKeys;
×
234
      return this;
×
235
    }
236

237
    public Builder enumOptionKey(String enumOptionKey) {
238
      this.enumOptionKey = enumOptionKey;
×
239
      return this;
×
240
    }
241

242
    public Builder enumOptionKeys(List<String> enumOptionKeys) {
243
      this.enumOptionKeys = enumOptionKeys;
×
244
      return this;
×
245
    }
246

247
    public Builder multiSelectOptionKey(String multiSelectOptionKey) {
248
      this.multiSelectOptionKey = multiSelectOptionKey;
×
249
      return this;
×
250
    }
251

252
    public Builder multiSelectOptionKeys(List<String> multiSelectOptionKeys) {
253
      this.multiSelectOptionKeys = multiSelectOptionKeys;
×
254
      return this;
×
255
    }
256

257
    public UpdateMetadataTemplateRequestBody build() {
258
      return new UpdateMetadataTemplateRequestBody(this);
1✔
259
    }
260
  }
261
}
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