• 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

6.9
/src/main/java/com/box/sdkgen/schemas/resourcescope/ResourceScope.java
1
package com.box.sdkgen.schemas.resourcescope;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.filemini.FileMini;
6
import com.box.sdkgen.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.resource.Resource;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonFilter;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Objects;
13

14
/**
15
 * A relation between a resource (file or folder) and the scopes for which the resource can be
16
 * accessed.
17
 */
18
@JsonFilter("nullablePropertyFilter")
19
public class ResourceScope extends SerializableObject {
20

21
  /** The scopes for the resource access. */
22
  @JsonDeserialize(using = ResourceScopeScopeField.ResourceScopeScopeFieldDeserializer.class)
23
  @JsonSerialize(using = ResourceScopeScopeField.ResourceScopeScopeFieldSerializer.class)
24
  protected EnumWrapper<ResourceScopeScopeField> scope;
25

26
  protected Resource object;
27

28
  public ResourceScope() {
29
    super();
1✔
30
  }
1✔
31

32
  protected ResourceScope(Builder builder) {
33
    super();
×
34
    this.scope = builder.scope;
×
35
    this.object = builder.object;
×
36
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
37
  }
×
38

39
  public EnumWrapper<ResourceScopeScopeField> getScope() {
40
    return scope;
×
41
  }
42

43
  public Resource getObject() {
44
    return object;
×
45
  }
46

47
  @Override
48
  public boolean equals(Object o) {
49
    if (this == o) {
×
50
      return true;
×
51
    }
52
    if (o == null || getClass() != o.getClass()) {
×
53
      return false;
×
54
    }
55
    ResourceScope casted = (ResourceScope) o;
×
56
    return Objects.equals(scope, casted.scope) && Objects.equals(object, casted.object);
×
57
  }
58

59
  @Override
60
  public int hashCode() {
61
    return Objects.hash(scope, object);
×
62
  }
63

64
  @Override
65
  public String toString() {
66
    return "ResourceScope{" + "scope='" + scope + '\'' + ", " + "object='" + object + '\'' + "}";
×
67
  }
68

69
  public static class Builder extends NullableFieldTracker {
×
70

71
    protected EnumWrapper<ResourceScopeScopeField> scope;
72

73
    protected Resource object;
74

75
    public Builder scope(ResourceScopeScopeField scope) {
76
      this.scope = new EnumWrapper<ResourceScopeScopeField>(scope);
×
77
      return this;
×
78
    }
79

80
    public Builder scope(EnumWrapper<ResourceScopeScopeField> scope) {
81
      this.scope = scope;
×
82
      return this;
×
83
    }
84

85
    public Builder object(FolderMini object) {
86
      this.object = new Resource(object);
×
87
      return this;
×
88
    }
89

90
    public Builder object(FileMini object) {
91
      this.object = new Resource(object);
×
92
      return this;
×
93
    }
94

95
    public Builder object(Resource object) {
96
      this.object = object;
×
97
      return this;
×
98
    }
99

100
    public ResourceScope build() {
101
      return new ResourceScope(this);
×
102
    }
103
  }
104
}
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