• 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

32.0
/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitHeaders.java
1
package com.box.sdkgen.managers.chunkeduploads;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4

5
import java.util.Map;
6

7
public class CreateFileUploadSessionCommitHeaders {
8

9
  /**
10
   * The [RFC3230][1] message digest of the whole file.
11
   *
12
   * <p>Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is
13
   * as `sha=BASE64_ENCODED_DIGEST`.
14
   *
15
   * <p>[1]: https://tools.ietf.org/html/rfc3230
16
   */
17
  public final String digest;
18

19
  /**
20
   * Ensures this item hasn't recently changed before making changes.
21
   *
22
   * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail
23
   * with a `412 Precondition Failed` if it has changed since.
24
   */
25
  public String ifMatch;
26

27
  /**
28
   * Ensures an item is only returned if it has changed.
29
   *
30
   * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail
31
   * with a `304 Not Modified` if the item has not changed since.
32
   */
33
  public String ifNoneMatch;
34

35
  /** Extra headers that will be included in the HTTP request. */
36
  public Map<String, String> extraHeaders;
37

38
  public CreateFileUploadSessionCommitHeaders(String digest) {
1✔
39
    this.digest = digest;
1✔
40
    this.extraHeaders = mapOf();
1✔
41
  }
1✔
42

43
  protected CreateFileUploadSessionCommitHeaders(Builder builder) {
×
44
    this.digest = builder.digest;
×
45
    this.ifMatch = builder.ifMatch;
×
46
    this.ifNoneMatch = builder.ifNoneMatch;
×
47
    this.extraHeaders = builder.extraHeaders;
×
48
  }
×
49

50
  public String getDigest() {
51
    return digest;
1✔
52
  }
53

54
  public String getIfMatch() {
55
    return ifMatch;
1✔
56
  }
57

58
  public String getIfNoneMatch() {
59
    return ifNoneMatch;
1✔
60
  }
61

62
  public Map<String, String> getExtraHeaders() {
63
    return extraHeaders;
1✔
64
  }
65

66
  public static class Builder {
67

68
    protected final String digest;
69

70
    protected String ifMatch;
71

72
    protected String ifNoneMatch;
73

74
    protected Map<String, String> extraHeaders;
75

76
    public Builder(String digest) {
×
77
      this.digest = digest;
×
78
      this.extraHeaders = mapOf();
×
79
    }
×
80

81
    public Builder ifMatch(String ifMatch) {
82
      this.ifMatch = ifMatch;
×
83
      return this;
×
84
    }
85

86
    public Builder ifNoneMatch(String ifNoneMatch) {
87
      this.ifNoneMatch = ifNoneMatch;
×
88
      return this;
×
89
    }
90

91
    public Builder extraHeaders(Map<String, String> extraHeaders) {
92
      this.extraHeaders = extraHeaders;
×
93
      return this;
×
94
    }
95

96
    public CreateFileUploadSessionCommitHeaders build() {
97
      return new CreateFileUploadSessionCommitHeaders(this);
×
98
    }
99
  }
100
}
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