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

box / box-java-sdk-gen / #362

14 Jul 2025 11:20AM UTC coverage: 38.076% (+2.5%) from 35.58%
#362

push

github

web-flow
feat: Support common union fields and implicit union conversion (box/box-codegen#758) (#361)

288 of 1203 new or added lines in 106 files covered. (23.94%)

167 existing lines in 45 files now uncovered.

18536 of 48681 relevant lines covered (38.08%)

0.38 hits per line

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

9.21
/src/main/java/com/box/sdkgen/schemas/integrationmapping/IntegrationMapping.java
1
package com.box.sdkgen.schemas.integrationmapping;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.foldermini.FolderMini;
5
import com.box.sdkgen.schemas.integrationmappingbase.IntegrationMappingBase;
6
import com.box.sdkgen.schemas.integrationmappingbase.IntegrationMappingBaseTypeField;
7
import com.box.sdkgen.schemas.integrationmappingpartneritemslack.IntegrationMappingPartnerItemSlack;
8
import com.box.sdkgen.schemas.integrationmappingpartneritemslackunion.IntegrationMappingPartnerItemSlackUnion;
9
import com.box.sdkgen.schemas.integrationmappingslackoptions.IntegrationMappingSlackOptions;
10
import com.box.sdkgen.schemas.userintegrationmappings.UserIntegrationMappings;
11
import com.box.sdkgen.serialization.json.EnumWrapper;
12
import com.fasterxml.jackson.annotation.JsonFilter;
13
import com.fasterxml.jackson.annotation.JsonProperty;
14
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
15
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
16
import java.util.Date;
17
import java.util.Objects;
18

19
@JsonFilter("nullablePropertyFilter")
20
public class IntegrationMapping extends IntegrationMappingBase {
21

22
  @JsonDeserialize(
23
      using =
24
          IntegrationMappingIntegrationTypeField.IntegrationMappingIntegrationTypeFieldDeserializer
25
              .class)
26
  @JsonSerialize(
27
      using =
28
          IntegrationMappingIntegrationTypeField.IntegrationMappingIntegrationTypeFieldSerializer
29
              .class)
30
  @JsonProperty("integration_type")
31
  protected EnumWrapper<IntegrationMappingIntegrationTypeField> integrationType;
32

33
  @JsonProperty("is_manually_created")
34
  protected Boolean isManuallyCreated;
35

36
  protected IntegrationMappingSlackOptions options;
37

38
  @JsonProperty("created_by")
39
  protected UserIntegrationMappings createdBy;
40

41
  @JsonProperty("modified_by")
42
  protected UserIntegrationMappings modifiedBy;
43

44
  @JsonProperty("partner_item")
45
  protected final IntegrationMappingPartnerItemSlackUnion partnerItem;
46

47
  @JsonProperty("box_item")
48
  protected final FolderMini boxItem;
49

50
  @JsonProperty("created_at")
51
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
52
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
53
  protected Date createdAt;
54

55
  @JsonProperty("modified_at")
56
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
57
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
58
  protected Date modifiedAt;
59

60
  public IntegrationMapping(
61
      String id, IntegrationMappingPartnerItemSlack partnerItem, FolderMini boxItem) {
NEW
62
    super(id);
×
NEW
63
    this.partnerItem = new IntegrationMappingPartnerItemSlackUnion(partnerItem);
×
NEW
64
    this.boxItem = boxItem;
×
NEW
65
  }
×
66

67
  public IntegrationMapping(
68
      @JsonProperty("id") String id,
69
      @JsonProperty("partner_item") IntegrationMappingPartnerItemSlackUnion partnerItem,
70
      @JsonProperty("box_item") FolderMini boxItem) {
71
    super(id);
1✔
72
    this.partnerItem = partnerItem;
1✔
73
    this.boxItem = boxItem;
1✔
74
  }
1✔
75

76
  protected IntegrationMapping(Builder builder) {
77
    super(builder);
×
78
    this.integrationType = builder.integrationType;
×
79
    this.isManuallyCreated = builder.isManuallyCreated;
×
80
    this.options = builder.options;
×
81
    this.createdBy = builder.createdBy;
×
82
    this.modifiedBy = builder.modifiedBy;
×
83
    this.partnerItem = builder.partnerItem;
×
84
    this.boxItem = builder.boxItem;
×
85
    this.createdAt = builder.createdAt;
×
86
    this.modifiedAt = builder.modifiedAt;
×
87
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
88
  }
×
89

90
  public EnumWrapper<IntegrationMappingIntegrationTypeField> getIntegrationType() {
91
    return integrationType;
1✔
92
  }
93

94
  public Boolean getIsManuallyCreated() {
95
    return isManuallyCreated;
×
96
  }
97

98
  public IntegrationMappingSlackOptions getOptions() {
99
    return options;
×
100
  }
101

102
  public UserIntegrationMappings getCreatedBy() {
103
    return createdBy;
×
104
  }
105

106
  public UserIntegrationMappings getModifiedBy() {
107
    return modifiedBy;
×
108
  }
109

110
  public IntegrationMappingPartnerItemSlackUnion getPartnerItem() {
111
    return partnerItem;
1✔
112
  }
113

114
  public FolderMini getBoxItem() {
115
    return boxItem;
1✔
116
  }
117

118
  public Date getCreatedAt() {
119
    return createdAt;
×
120
  }
121

122
  public Date getModifiedAt() {
123
    return modifiedAt;
×
124
  }
125

126
  @Override
127
  public boolean equals(Object o) {
128
    if (this == o) {
×
129
      return true;
×
130
    }
131
    if (o == null || getClass() != o.getClass()) {
×
132
      return false;
×
133
    }
134
    IntegrationMapping casted = (IntegrationMapping) o;
×
135
    return Objects.equals(id, casted.id)
×
136
        && Objects.equals(type, casted.type)
×
137
        && Objects.equals(integrationType, casted.integrationType)
×
138
        && Objects.equals(isManuallyCreated, casted.isManuallyCreated)
×
139
        && Objects.equals(options, casted.options)
×
140
        && Objects.equals(createdBy, casted.createdBy)
×
141
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
142
        && Objects.equals(partnerItem, casted.partnerItem)
×
143
        && Objects.equals(boxItem, casted.boxItem)
×
144
        && Objects.equals(createdAt, casted.createdAt)
×
145
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
146
  }
147

148
  @Override
149
  public int hashCode() {
150
    return Objects.hash(
×
151
        id,
152
        type,
153
        integrationType,
154
        isManuallyCreated,
155
        options,
156
        createdBy,
157
        modifiedBy,
158
        partnerItem,
159
        boxItem,
160
        createdAt,
161
        modifiedAt);
162
  }
163

164
  @Override
165
  public String toString() {
166
    return "IntegrationMapping{"
×
167
        + "id='"
168
        + id
169
        + '\''
170
        + ", "
171
        + "type='"
172
        + type
173
        + '\''
174
        + ", "
175
        + "integrationType='"
176
        + integrationType
177
        + '\''
178
        + ", "
179
        + "isManuallyCreated='"
180
        + isManuallyCreated
181
        + '\''
182
        + ", "
183
        + "options='"
184
        + options
185
        + '\''
186
        + ", "
187
        + "createdBy='"
188
        + createdBy
189
        + '\''
190
        + ", "
191
        + "modifiedBy='"
192
        + modifiedBy
193
        + '\''
194
        + ", "
195
        + "partnerItem='"
196
        + partnerItem
197
        + '\''
198
        + ", "
199
        + "boxItem='"
200
        + boxItem
201
        + '\''
202
        + ", "
203
        + "createdAt='"
204
        + createdAt
205
        + '\''
206
        + ", "
207
        + "modifiedAt='"
208
        + modifiedAt
209
        + '\''
210
        + "}";
211
  }
212

213
  public static class Builder extends IntegrationMappingBase.Builder {
214

215
    protected EnumWrapper<IntegrationMappingIntegrationTypeField> integrationType;
216

217
    protected Boolean isManuallyCreated;
218

219
    protected IntegrationMappingSlackOptions options;
220

221
    protected UserIntegrationMappings createdBy;
222

223
    protected UserIntegrationMappings modifiedBy;
224

225
    protected final IntegrationMappingPartnerItemSlackUnion partnerItem;
226

227
    protected final FolderMini boxItem;
228

229
    protected Date createdAt;
230

231
    protected Date modifiedAt;
232

233
    public Builder(String id, IntegrationMappingPartnerItemSlack partnerItem, FolderMini boxItem) {
NEW
234
      super(id);
×
NEW
235
      this.partnerItem = new IntegrationMappingPartnerItemSlackUnion(partnerItem);
×
NEW
236
      this.boxItem = boxItem;
×
NEW
237
    }
×
238

239
    public Builder(
240
        String id, IntegrationMappingPartnerItemSlackUnion partnerItem, FolderMini boxItem) {
241
      super(id);
×
242
      this.partnerItem = partnerItem;
×
243
      this.boxItem = boxItem;
×
244
    }
×
245

246
    public Builder integrationType(IntegrationMappingIntegrationTypeField integrationType) {
247
      this.integrationType =
×
248
          new EnumWrapper<IntegrationMappingIntegrationTypeField>(integrationType);
249
      return this;
×
250
    }
251

252
    public Builder integrationType(
253
        EnumWrapper<IntegrationMappingIntegrationTypeField> integrationType) {
254
      this.integrationType = integrationType;
×
255
      return this;
×
256
    }
257

258
    public Builder isManuallyCreated(Boolean isManuallyCreated) {
259
      this.isManuallyCreated = isManuallyCreated;
×
260
      return this;
×
261
    }
262

263
    public Builder options(IntegrationMappingSlackOptions options) {
264
      this.options = options;
×
265
      return this;
×
266
    }
267

268
    public Builder createdBy(UserIntegrationMappings createdBy) {
269
      this.createdBy = createdBy;
×
270
      return this;
×
271
    }
272

273
    public Builder modifiedBy(UserIntegrationMappings modifiedBy) {
274
      this.modifiedBy = modifiedBy;
×
275
      return this;
×
276
    }
277

278
    public Builder createdAt(Date createdAt) {
279
      this.createdAt = createdAt;
×
280
      return this;
×
281
    }
282

283
    public Builder modifiedAt(Date modifiedAt) {
284
      this.modifiedAt = modifiedAt;
×
285
      return this;
×
286
    }
287

288
    @Override
289
    public Builder type(IntegrationMappingBaseTypeField type) {
290
      this.type = new EnumWrapper<IntegrationMappingBaseTypeField>(type);
×
291
      return this;
×
292
    }
293

294
    @Override
295
    public Builder type(EnumWrapper<IntegrationMappingBaseTypeField> type) {
296
      this.type = type;
×
297
      return this;
×
298
    }
299

300
    public IntegrationMapping build() {
301
      return new IntegrationMapping(this);
×
302
    }
303
  }
304
}
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