• 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

21.05
/src/main/java/com/box/sdkgen/schemas/appitemassociation/AppItemAssociation.java
1
package com.box.sdkgen.schemas.appitemassociation;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.appitem.AppItem;
5
import com.box.sdkgen.schemas.filebaseorfolderbaseorweblinkbase.FileBaseOrFolderBaseOrWebLinkBase;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
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.Objects;
11

12
public class AppItemAssociation extends SerializableObject {
13

14
  protected final String id;
15

16
  @JsonDeserialize(
17
      using = AppItemAssociationTypeField.AppItemAssociationTypeFieldDeserializer.class)
18
  @JsonSerialize(using = AppItemAssociationTypeField.AppItemAssociationTypeFieldSerializer.class)
19
  protected EnumWrapper<AppItemAssociationTypeField> type;
20

21
  @JsonProperty("app_item")
22
  protected final AppItem appItem;
23

24
  protected final FileBaseOrFolderBaseOrWebLinkBase item;
25

26
  public AppItemAssociation(
27
      @JsonProperty("id") String id,
28
      @JsonProperty("app_item") AppItem appItem,
29
      @JsonProperty("item") FileBaseOrFolderBaseOrWebLinkBase item) {
30
    super();
1✔
31
    this.id = id;
1✔
32
    this.appItem = appItem;
1✔
33
    this.item = item;
1✔
34
    this.type =
1✔
35
        new EnumWrapper<AppItemAssociationTypeField>(
36
            AppItemAssociationTypeField.APP_ITEM_ASSOCIATION);
37
  }
1✔
38

39
  protected AppItemAssociation(Builder builder) {
40
    super();
×
41
    this.id = builder.id;
×
42
    this.type = builder.type;
×
43
    this.appItem = builder.appItem;
×
44
    this.item = builder.item;
×
45
  }
×
46

47
  public String getId() {
48
    return id;
1✔
49
  }
50

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

55
  public AppItem getAppItem() {
56
    return appItem;
1✔
57
  }
58

59
  public FileBaseOrFolderBaseOrWebLinkBase getItem() {
60
    return item;
×
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
    AppItemAssociation casted = (AppItemAssociation) o;
×
72
    return Objects.equals(id, casted.id)
×
73
        && Objects.equals(type, casted.type)
×
74
        && Objects.equals(appItem, casted.appItem)
×
75
        && Objects.equals(item, casted.item);
×
76
  }
77

78
  @Override
79
  public int hashCode() {
80
    return Objects.hash(id, type, appItem, item);
×
81
  }
82

83
  @Override
84
  public String toString() {
85
    return "AppItemAssociation{"
×
86
        + "id='"
87
        + id
88
        + '\''
89
        + ", "
90
        + "type='"
91
        + type
92
        + '\''
93
        + ", "
94
        + "appItem='"
95
        + appItem
96
        + '\''
97
        + ", "
98
        + "item='"
99
        + item
100
        + '\''
101
        + "}";
102
  }
103

104
  public static class Builder {
105

106
    protected final String id;
107

108
    protected EnumWrapper<AppItemAssociationTypeField> type;
109

110
    protected final AppItem appItem;
111

112
    protected final FileBaseOrFolderBaseOrWebLinkBase item;
113

NEW
114
    public Builder(String id, AppItem appItem, FileBaseOrFolderBaseOrWebLinkBase item) {
×
115
      this.id = id;
×
116
      this.appItem = appItem;
×
117
      this.item = item;
×
118
      this.type =
×
119
          new EnumWrapper<AppItemAssociationTypeField>(
120
              AppItemAssociationTypeField.APP_ITEM_ASSOCIATION);
121
    }
×
122

123
    public Builder type(AppItemAssociationTypeField type) {
124
      this.type = new EnumWrapper<AppItemAssociationTypeField>(type);
×
125
      return this;
×
126
    }
127

128
    public Builder type(EnumWrapper<AppItemAssociationTypeField> type) {
129
      this.type = type;
×
130
      return this;
×
131
    }
132

133
    public AppItemAssociation build() {
134
      return new AppItemAssociation(this);
×
135
    }
136
  }
137
}
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