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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

48.98
/src/main/java/com/box/sdkgen/managers/groups/CreateGroupRequestBody.java
1
package com.box.sdkgen.managers.groups;
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.Objects;
11

12
@JsonFilter("nullablePropertyFilter")
13
public class CreateGroupRequestBody extends SerializableObject {
14

15
  /** The name of the new group to be created. This name must be unique within the enterprise. */
16
  protected final String name;
17

18
  /**
19
   * Keeps track of which external source this group is coming, for example `Active Directory`, or
20
   * `Okta`.
21
   *
22
   * <p>Setting this will also prevent Box admins from editing the group name and its members
23
   * directly via the Box web application.
24
   *
25
   * <p>This is desirable for one-way syncing of groups.
26
   */
27
  protected String provenance;
28

29
  /**
30
   * An arbitrary identifier that can be used by external group sync tools to link this Box Group to
31
   * an external group.
32
   *
33
   * <p>Example values of this field could be an **Active Directory Object ID** or a **Google Group
34
   * ID**.
35
   *
36
   * <p>We recommend you use of this field in order to avoid issues when group names are updated in
37
   * either Box or external systems.
38
   */
39
  @JsonProperty("external_sync_identifier")
40
  protected String externalSyncIdentifier;
41

42
  /** A human readable description of the group. */
43
  protected String description;
44

45
  /**
46
   * Specifies who can invite the group to collaborate on folders.
47
   *
48
   * <p>When set to `admins_only` the enterprise admin, co-admins, and the group's admin can invite
49
   * the group.
50
   *
51
   * <p>When set to `admins_and_members` all the admins listed above and group members can invite
52
   * the group.
53
   *
54
   * <p>When set to `all_managed_users` all managed users in the enterprise can invite the group.
55
   */
56
  @JsonDeserialize(
57
      using =
58
          CreateGroupRequestBodyInvitabilityLevelField
59
              .CreateGroupRequestBodyInvitabilityLevelFieldDeserializer.class)
60
  @JsonSerialize(
61
      using =
62
          CreateGroupRequestBodyInvitabilityLevelField
63
              .CreateGroupRequestBodyInvitabilityLevelFieldSerializer.class)
64
  @JsonProperty("invitability_level")
65
  protected EnumWrapper<CreateGroupRequestBodyInvitabilityLevelField> invitabilityLevel;
66

67
  /**
68
   * Specifies who can see the members of the group.
69
   *
70
   * <p>* `admins_only` - the enterprise admin, co-admins, group's group admin. *
71
   * `admins_and_members` - all admins and group members. * `all_managed_users` - all managed users
72
   * in the enterprise.
73
   */
74
  @JsonDeserialize(
75
      using =
76
          CreateGroupRequestBodyMemberViewabilityLevelField
77
              .CreateGroupRequestBodyMemberViewabilityLevelFieldDeserializer.class)
78
  @JsonSerialize(
79
      using =
80
          CreateGroupRequestBodyMemberViewabilityLevelField
81
              .CreateGroupRequestBodyMemberViewabilityLevelFieldSerializer.class)
82
  @JsonProperty("member_viewability_level")
83
  protected EnumWrapper<CreateGroupRequestBodyMemberViewabilityLevelField> memberViewabilityLevel;
84

85
  public CreateGroupRequestBody(@JsonProperty("name") String name) {
86
    super();
1✔
87
    this.name = name;
1✔
88
  }
1✔
89

90
  protected CreateGroupRequestBody(Builder builder) {
91
    super();
1✔
92
    this.name = builder.name;
1✔
93
    this.provenance = builder.provenance;
1✔
94
    this.externalSyncIdentifier = builder.externalSyncIdentifier;
1✔
95
    this.description = builder.description;
1✔
96
    this.invitabilityLevel = builder.invitabilityLevel;
1✔
97
    this.memberViewabilityLevel = builder.memberViewabilityLevel;
1✔
98
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
99
  }
1✔
100

101
  public String getName() {
102
    return name;
1✔
103
  }
104

105
  public String getProvenance() {
106
    return provenance;
1✔
107
  }
108

109
  public String getExternalSyncIdentifier() {
110
    return externalSyncIdentifier;
1✔
111
  }
112

113
  public String getDescription() {
114
    return description;
1✔
115
  }
116

117
  public EnumWrapper<CreateGroupRequestBodyInvitabilityLevelField> getInvitabilityLevel() {
118
    return invitabilityLevel;
1✔
119
  }
120

121
  public EnumWrapper<CreateGroupRequestBodyMemberViewabilityLevelField>
122
      getMemberViewabilityLevel() {
123
    return memberViewabilityLevel;
1✔
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
    CreateGroupRequestBody casted = (CreateGroupRequestBody) o;
×
135
    return Objects.equals(name, casted.name)
×
136
        && Objects.equals(provenance, casted.provenance)
×
137
        && Objects.equals(externalSyncIdentifier, casted.externalSyncIdentifier)
×
138
        && Objects.equals(description, casted.description)
×
139
        && Objects.equals(invitabilityLevel, casted.invitabilityLevel)
×
140
        && Objects.equals(memberViewabilityLevel, casted.memberViewabilityLevel);
×
141
  }
142

143
  @Override
144
  public int hashCode() {
145
    return Objects.hash(
×
146
        name,
147
        provenance,
148
        externalSyncIdentifier,
149
        description,
150
        invitabilityLevel,
151
        memberViewabilityLevel);
152
  }
153

154
  @Override
155
  public String toString() {
156
    return "CreateGroupRequestBody{"
×
157
        + "name='"
158
        + name
159
        + '\''
160
        + ", "
161
        + "provenance='"
162
        + provenance
163
        + '\''
164
        + ", "
165
        + "externalSyncIdentifier='"
166
        + externalSyncIdentifier
167
        + '\''
168
        + ", "
169
        + "description='"
170
        + description
171
        + '\''
172
        + ", "
173
        + "invitabilityLevel='"
174
        + invitabilityLevel
175
        + '\''
176
        + ", "
177
        + "memberViewabilityLevel='"
178
        + memberViewabilityLevel
179
        + '\''
180
        + "}";
181
  }
182

183
  public static class Builder extends NullableFieldTracker {
184

185
    protected final String name;
186

187
    protected String provenance;
188

189
    protected String externalSyncIdentifier;
190

191
    protected String description;
192

193
    protected EnumWrapper<CreateGroupRequestBodyInvitabilityLevelField> invitabilityLevel;
194

195
    protected EnumWrapper<CreateGroupRequestBodyMemberViewabilityLevelField> memberViewabilityLevel;
196

197
    public Builder(String name) {
198
      super();
1✔
199
      this.name = name;
1✔
200
    }
1✔
201

202
    public Builder provenance(String provenance) {
203
      this.provenance = provenance;
×
204
      return this;
×
205
    }
206

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

212
    public Builder description(String description) {
213
      this.description = description;
1✔
214
      return this;
1✔
215
    }
216

217
    public Builder invitabilityLevel(
218
        CreateGroupRequestBodyInvitabilityLevelField invitabilityLevel) {
219
      this.invitabilityLevel =
×
220
          new EnumWrapper<CreateGroupRequestBodyInvitabilityLevelField>(invitabilityLevel);
221
      return this;
×
222
    }
223

224
    public Builder invitabilityLevel(
225
        EnumWrapper<CreateGroupRequestBodyInvitabilityLevelField> invitabilityLevel) {
226
      this.invitabilityLevel = invitabilityLevel;
×
227
      return this;
×
228
    }
229

230
    public Builder memberViewabilityLevel(
231
        CreateGroupRequestBodyMemberViewabilityLevelField memberViewabilityLevel) {
232
      this.memberViewabilityLevel =
×
233
          new EnumWrapper<CreateGroupRequestBodyMemberViewabilityLevelField>(
234
              memberViewabilityLevel);
235
      return this;
×
236
    }
237

238
    public Builder memberViewabilityLevel(
239
        EnumWrapper<CreateGroupRequestBodyMemberViewabilityLevelField> memberViewabilityLevel) {
240
      this.memberViewabilityLevel = memberViewabilityLevel;
×
241
      return this;
×
242
    }
243

244
    public CreateGroupRequestBody build() {
245
      return new CreateGroupRequestBody(this);
1✔
246
    }
247
  }
248
}
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