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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

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

45.76
/src/main/java/com/box/sdkgen/schemas/createaiagent/CreateAiAgent.java
1
package com.box.sdkgen.schemas.createaiagent;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentallowedentity.AiAgentAllowedEntity;
6
import com.box.sdkgen.schemas.aistudioagentask.AiStudioAgentAsk;
7
import com.box.sdkgen.schemas.aistudioagentextract.AiStudioAgentExtract;
8
import com.box.sdkgen.schemas.aistudioagenttextgen.AiStudioAgentTextGen;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.fasterxml.jackson.annotation.JsonFilter;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
13
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
14
import java.util.List;
15
import java.util.Objects;
16

17
@JsonFilter("nullablePropertyFilter")
18
public class CreateAiAgent extends SerializableObject {
19

20
  @JsonDeserialize(using = CreateAiAgentTypeField.CreateAiAgentTypeFieldDeserializer.class)
21
  @JsonSerialize(using = CreateAiAgentTypeField.CreateAiAgentTypeFieldSerializer.class)
22
  protected EnumWrapper<CreateAiAgentTypeField> type;
23

24
  protected final String name;
25

26
  @JsonProperty("access_state")
27
  protected final String accessState;
28

29
  @JsonProperty("icon_reference")
30
  protected String iconReference;
31

32
  @JsonProperty("allowed_entities")
33
  protected List<AiAgentAllowedEntity> allowedEntities;
34

35
  protected AiStudioAgentAsk ask;
36

37
  @JsonProperty("text_gen")
38
  protected AiStudioAgentTextGen textGen;
39

40
  protected AiStudioAgentExtract extract;
41

42
  public CreateAiAgent(
43
      @JsonProperty("name") String name, @JsonProperty("access_state") String accessState) {
44
    super();
×
45
    this.name = name;
×
UNCOV
46
    this.accessState = accessState;
×
UNCOV
47
    this.type = new EnumWrapper<CreateAiAgentTypeField>(CreateAiAgentTypeField.AI_AGENT);
×
UNCOV
48
  }
×
49

50
  protected CreateAiAgent(Builder builder) {
51
    super();
1✔
52
    this.type = builder.type;
1✔
53
    this.name = builder.name;
1✔
54
    this.accessState = builder.accessState;
1✔
55
    this.iconReference = builder.iconReference;
1✔
56
    this.allowedEntities = builder.allowedEntities;
1✔
57
    this.ask = builder.ask;
1✔
58
    this.textGen = builder.textGen;
1✔
59
    this.extract = builder.extract;
1✔
60
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
61
  }
1✔
62

63
  public EnumWrapper<CreateAiAgentTypeField> getType() {
64
    return type;
1✔
65
  }
66

67
  public String getName() {
68
    return name;
1✔
69
  }
70

71
  public String getAccessState() {
72
    return accessState;
1✔
73
  }
74

75
  public String getIconReference() {
76
    return iconReference;
1✔
77
  }
78

79
  public List<AiAgentAllowedEntity> getAllowedEntities() {
80
    return allowedEntities;
1✔
81
  }
82

83
  public AiStudioAgentAsk getAsk() {
84
    return ask;
1✔
85
  }
86

87
  public AiStudioAgentTextGen getTextGen() {
88
    return textGen;
1✔
89
  }
90

91
  public AiStudioAgentExtract getExtract() {
92
    return extract;
1✔
93
  }
94

95
  @Override
96
  public boolean equals(Object o) {
97
    if (this == o) {
×
UNCOV
98
      return true;
×
99
    }
100
    if (o == null || getClass() != o.getClass()) {
×
101
      return false;
×
102
    }
103
    CreateAiAgent casted = (CreateAiAgent) o;
×
104
    return Objects.equals(type, casted.type)
×
105
        && Objects.equals(name, casted.name)
×
106
        && Objects.equals(accessState, casted.accessState)
×
107
        && Objects.equals(iconReference, casted.iconReference)
×
UNCOV
108
        && Objects.equals(allowedEntities, casted.allowedEntities)
×
UNCOV
109
        && Objects.equals(ask, casted.ask)
×
UNCOV
110
        && Objects.equals(textGen, casted.textGen)
×
UNCOV
111
        && Objects.equals(extract, casted.extract);
×
112
  }
113

114
  @Override
115
  public int hashCode() {
UNCOV
116
    return Objects.hash(
×
117
        type, name, accessState, iconReference, allowedEntities, ask, textGen, extract);
118
  }
119

120
  @Override
121
  public String toString() {
UNCOV
122
    return "CreateAiAgent{"
×
123
        + "type='"
124
        + type
125
        + '\''
126
        + ", "
127
        + "name='"
128
        + name
129
        + '\''
130
        + ", "
131
        + "accessState='"
132
        + accessState
133
        + '\''
134
        + ", "
135
        + "iconReference='"
136
        + iconReference
137
        + '\''
138
        + ", "
139
        + "allowedEntities='"
140
        + allowedEntities
141
        + '\''
142
        + ", "
143
        + "ask='"
144
        + ask
145
        + '\''
146
        + ", "
147
        + "textGen='"
148
        + textGen
149
        + '\''
150
        + ", "
151
        + "extract='"
152
        + extract
153
        + '\''
154
        + "}";
155
  }
156

157
  public static class Builder extends NullableFieldTracker {
158

159
    protected EnumWrapper<CreateAiAgentTypeField> type;
160

161
    protected final String name;
162

163
    protected final String accessState;
164

165
    protected String iconReference;
166

167
    protected List<AiAgentAllowedEntity> allowedEntities;
168

169
    protected AiStudioAgentAsk ask;
170

171
    protected AiStudioAgentTextGen textGen;
172

173
    protected AiStudioAgentExtract extract;
174

175
    public Builder(String name, String accessState) {
176
      super();
1✔
177
      this.name = name;
1✔
178
      this.accessState = accessState;
1✔
179
      this.type = new EnumWrapper<CreateAiAgentTypeField>(CreateAiAgentTypeField.AI_AGENT);
1✔
180
    }
1✔
181

182
    public Builder type(CreateAiAgentTypeField type) {
183
      this.type = new EnumWrapper<CreateAiAgentTypeField>(type);
×
184
      return this;
×
185
    }
186

187
    public Builder type(EnumWrapper<CreateAiAgentTypeField> type) {
188
      this.type = type;
×
189
      return this;
×
190
    }
191

192
    public Builder iconReference(String iconReference) {
193
      this.iconReference = iconReference;
×
194
      return this;
×
195
    }
196

197
    public Builder allowedEntities(List<AiAgentAllowedEntity> allowedEntities) {
UNCOV
198
      this.allowedEntities = allowedEntities;
×
UNCOV
199
      return this;
×
200
    }
201

202
    public Builder ask(AiStudioAgentAsk ask) {
203
      this.ask = ask;
1✔
204
      return this;
1✔
205
    }
206

207
    public Builder textGen(AiStudioAgentTextGen textGen) {
208
      this.textGen = textGen;
×
209
      return this;
×
210
    }
211

212
    public Builder extract(AiStudioAgentExtract extract) {
UNCOV
213
      this.extract = extract;
×
UNCOV
214
      return this;
×
215
    }
216

217
    public CreateAiAgent build() {
218
      return new CreateAiAgent(this);
1✔
219
    }
220
  }
221
}
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