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

box / box-java-sdk-gen / #358

11 Jul 2025 04:43PM UTC coverage: 38.091% (+2.5%) from 35.58%
#358

Pull #361

github

web-flow
Merge 112b63b24 into 426763c84
Pull Request #361: feat: Support common fields in Union in Java (box/box-codegen#758)

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

167 existing lines in 45 files now uncovered.

18543 of 48681 relevant lines covered (38.09%)

0.38 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.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.Objects;
12

13
@JsonFilter("nullablePropertyFilter")
14
public class MetadataQueryIndex extends SerializableObject {
15

16
  protected String id;
17

18
  protected final String type;
19

20
  @JsonDeserialize(
21
      using = MetadataQueryIndexStatusField.MetadataQueryIndexStatusFieldDeserializer.class)
22
  @JsonSerialize(
23
      using = MetadataQueryIndexStatusField.MetadataQueryIndexStatusFieldSerializer.class)
24
  protected final EnumWrapper<MetadataQueryIndexStatusField> status;
25

26
  protected List<MetadataQueryIndexFieldsField> fields;
27

28
  public MetadataQueryIndex(String type, MetadataQueryIndexStatusField status) {
UNCOV
29
    super();
×
30
    this.type = type;
×
NEW
31
    this.status = new EnumWrapper<MetadataQueryIndexStatusField>(status);
×
32
  }
×
33

34
  public MetadataQueryIndex(
35
      @JsonProperty("type") String type,
36
      @JsonProperty("status") EnumWrapper<MetadataQueryIndexStatusField> status) {
37
    super();
×
38
    this.type = type;
×
NEW
39
    this.status = status;
×
40
  }
×
41

42
  protected MetadataQueryIndex(Builder builder) {
43
    super();
×
44
    this.id = builder.id;
×
45
    this.type = builder.type;
×
46
    this.status = builder.status;
×
47
    this.fields = builder.fields;
×
48
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
49
  }
×
50

51
  public String getId() {
52
    return id;
×
53
  }
54

55
  public String getType() {
56
    return type;
×
57
  }
58

59
  public EnumWrapper<MetadataQueryIndexStatusField> getStatus() {
60
    return status;
×
61
  }
62

63
  public List<MetadataQueryIndexFieldsField> getFields() {
64
    return fields;
×
65
  }
66

67
  @Override
68
  public boolean equals(Object o) {
69
    if (this == o) {
×
70
      return true;
×
71
    }
72
    if (o == null || getClass() != o.getClass()) {
×
73
      return false;
×
74
    }
75
    MetadataQueryIndex casted = (MetadataQueryIndex) o;
×
76
    return Objects.equals(id, casted.id)
×
77
        && Objects.equals(type, casted.type)
×
78
        && Objects.equals(status, casted.status)
×
79
        && Objects.equals(fields, casted.fields);
×
80
  }
81

82
  @Override
83
  public int hashCode() {
84
    return Objects.hash(id, type, status, fields);
×
85
  }
86

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

108
  public static class Builder extends NullableFieldTracker {
109

110
    protected String id;
111

112
    protected final String type;
113

114
    protected final EnumWrapper<MetadataQueryIndexStatusField> status;
115

116
    protected List<MetadataQueryIndexFieldsField> fields;
117

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

124
    public Builder(String type, EnumWrapper<MetadataQueryIndexStatusField> status) {
125
      super();
×
126
      this.type = type;
×
NEW
127
      this.status = status;
×
128
    }
×
129

130
    public Builder id(String id) {
131
      this.id = id;
×
132
      return this;
×
133
    }
134

135
    public Builder fields(List<MetadataQueryIndexFieldsField> fields) {
136
      this.fields = fields;
×
137
      return this;
×
138
    }
139

140
    public MetadataQueryIndex build() {
141
      return new MetadataQueryIndex(this);
×
142
    }
143
  }
144
}
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