• 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

0.0
/src/main/java/com/box/sdkgen/schemas/metadataqueryindex/MetadataQueryIndex.java
1
package com.box.sdkgen.schemas.metadataqueryindex;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.annotation.JsonProperty;
6
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
7
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
8
import java.util.List;
9
import java.util.Objects;
10

11
public class MetadataQueryIndex extends SerializableObject {
12

13
  protected String id;
14

15
  protected final String type;
16

17
  @JsonDeserialize(
18
      using = MetadataQueryIndexStatusField.MetadataQueryIndexStatusFieldDeserializer.class)
19
  @JsonSerialize(
20
      using = MetadataQueryIndexStatusField.MetadataQueryIndexStatusFieldSerializer.class)
21
  protected final EnumWrapper<MetadataQueryIndexStatusField> status;
22

23
  protected List<MetadataQueryIndexFieldsField> fields;
24

25
  public MetadataQueryIndex(
26
      @JsonProperty("type") String type,
27
      @JsonProperty("status") EnumWrapper<MetadataQueryIndexStatusField> status) {
28
    super();
×
29
    this.type = type;
×
30
    this.status = status;
×
31
  }
×
32

33
  public MetadataQueryIndex(String type, MetadataQueryIndexStatusField status) {
34
    super();
×
35
    this.type = type;
×
36
    this.status = new EnumWrapper<MetadataQueryIndexStatusField>(status);
×
37
  }
×
38

39
  protected MetadataQueryIndex(Builder builder) {
40
    super();
×
41
    this.id = builder.id;
×
42
    this.type = builder.type;
×
43
    this.status = builder.status;
×
44
    this.fields = builder.fields;
×
45
  }
×
46

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

51
  public String getType() {
52
    return type;
×
53
  }
54

55
  public EnumWrapper<MetadataQueryIndexStatusField> getStatus() {
56
    return status;
×
57
  }
58

59
  public List<MetadataQueryIndexFieldsField> getFields() {
60
    return fields;
×
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
    MetadataQueryIndex casted = (MetadataQueryIndex) o;
×
72
    return Objects.equals(id, casted.id)
×
73
        && Objects.equals(type, casted.type)
×
74
        && Objects.equals(status, casted.status)
×
75
        && Objects.equals(fields, casted.fields);
×
76
  }
77

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

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

104
  public static class Builder {
105

106
    protected String id;
107

108
    protected final String type;
109

110
    protected final EnumWrapper<MetadataQueryIndexStatusField> status;
111

112
    protected List<MetadataQueryIndexFieldsField> fields;
113

NEW
114
    public Builder(String type, EnumWrapper<MetadataQueryIndexStatusField> status) {
×
115
      this.type = type;
×
116
      this.status = status;
×
117
    }
×
118

NEW
119
    public Builder(String type, MetadataQueryIndexStatusField status) {
×
120
      this.type = type;
×
121
      this.status = new EnumWrapper<MetadataQueryIndexStatusField>(status);
×
122
    }
×
123

124
    public Builder id(String id) {
125
      this.id = id;
×
126
      return this;
×
127
    }
128

129
    public Builder fields(List<MetadataQueryIndexFieldsField> fields) {
130
      this.fields = fields;
×
131
      return this;
×
132
    }
133

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