• 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

76.0
/src/main/java/com/box/sdkgen/managers/files/GetFileByIdHeaders.java
1
package com.box.sdkgen.managers.files;
2

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

5
import java.util.Map;
6

7
public class GetFileByIdHeaders {
8

9
  /**
10
   * Ensures an item is only returned if it has changed.
11
   *
12
   * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail
13
   * with a `304 Not Modified` if the item has not changed since.
14
   */
15
  public String ifNoneMatch;
16

17
  /**
18
   * The URL, and optional password, for the shared link of this item.
19
   *
20
   * <p>This header can be used to access items that have not been explicitly shared with a user.
21
   *
22
   * <p>Use the format `shared_link=[link]` or if a password is required then use
23
   * `shared_link=[link]&amp;shared_link_password=[password]`.
24
   *
25
   * <p>This header can be used on the file or folder shared, as well as on any files or folders
26
   * nested within the item.
27
   */
28
  public String boxapi;
29

30
  /**
31
   * A header required to request specific `representations` of a file. Use this in combination with
32
   * the `fields` query parameter to request a specific file representation.
33
   *
34
   * <p>The general format for these representations is `X-Rep-Hints: [...]` where `[...]` is one or
35
   * many hints in the format `[fileType?query]`.
36
   *
37
   * <p>For example, to request a `png` representation in `32x32` as well as `64x64` pixel
38
   * dimensions provide the following hints.
39
   *
40
   * <p>`x-rep-hints: [jpg?dimensions=32x32][jpg?dimensions=64x64]`
41
   *
42
   * <p>Additionally, a `text` representation is available for all document file types in Box using
43
   * the `[extracted_text]` representation.
44
   *
45
   * <p>`x-rep-hints: [extracted_text]`.
46
   */
47
  public String xRepHints;
48

49
  /** Extra headers that will be included in the HTTP request. */
50
  public Map<String, String> extraHeaders;
51

52
  public GetFileByIdHeaders() {
1✔
53
    this.extraHeaders = mapOf();
1✔
54
  }
1✔
55

56
  protected GetFileByIdHeaders(Builder builder) {
1✔
57
    this.ifNoneMatch = builder.ifNoneMatch;
1✔
58
    this.boxapi = builder.boxapi;
1✔
59
    this.xRepHints = builder.xRepHints;
1✔
60
    this.extraHeaders = builder.extraHeaders;
1✔
61
  }
1✔
62

63
  public String getIfNoneMatch() {
64
    return ifNoneMatch;
1✔
65
  }
66

67
  public String getBoxapi() {
68
    return boxapi;
1✔
69
  }
70

71
  public String getXRepHints() {
72
    return xRepHints;
1✔
73
  }
74

75
  public Map<String, String> getExtraHeaders() {
76
    return extraHeaders;
1✔
77
  }
78

79
  public static class Builder {
80

81
    protected String ifNoneMatch;
82

83
    protected String boxapi;
84

85
    protected String xRepHints;
86

87
    protected Map<String, String> extraHeaders;
88

89
    public Builder() {
1✔
90
      this.extraHeaders = mapOf();
1✔
91
    }
1✔
92

93
    public Builder ifNoneMatch(String ifNoneMatch) {
94
      this.ifNoneMatch = ifNoneMatch;
×
95
      return this;
×
96
    }
97

98
    public Builder boxapi(String boxapi) {
99
      this.boxapi = boxapi;
×
100
      return this;
×
101
    }
102

103
    public Builder xRepHints(String xRepHints) {
104
      this.xRepHints = xRepHints;
×
105
      return this;
×
106
    }
107

108
    public Builder extraHeaders(Map<String, String> extraHeaders) {
109
      this.extraHeaders = extraHeaders;
1✔
110
      return this;
1✔
111
    }
112

113
    public GetFileByIdHeaders build() {
114
      return new GetFileByIdHeaders(this);
1✔
115
    }
116
  }
117
}
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