• 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

34.78
/src/main/java/com/box/sdkgen/managers/uploads/UploadWithPreflightCheckRequestBody.java
1
package com.box.sdkgen.managers.uploads;
2

3
import java.io.InputStream;
4

5
public class UploadWithPreflightCheckRequestBody {
6

7
  public final UploadWithPreflightCheckRequestBodyAttributesField attributes;
8

9
  /**
10
   * The content of the file to upload to Box.
11
   *
12
   * <p>&lt;Message warning&gt;
13
   *
14
   * <p>The `attributes` part of the body must come **before** the `file` part. Requests that do not
15
   * follow this format when uploading the file will receive a HTTP `400` error with a
16
   * `metadata_after_file_contents` error code.
17
   *
18
   * <p>&lt;/Message&gt;
19
   */
20
  public final InputStream file;
21

22
  public String fileFileName;
23

24
  public String fileContentType;
25

26
  public UploadWithPreflightCheckRequestBody(
27
      UploadWithPreflightCheckRequestBodyAttributesField attributes, InputStream file) {
1✔
28
    this.attributes = attributes;
1✔
29
    this.file = file;
1✔
30
  }
1✔
31

32
  protected UploadWithPreflightCheckRequestBody(Builder builder) {
×
33
    this.attributes = builder.attributes;
×
34
    this.file = builder.file;
×
35
    this.fileFileName = builder.fileFileName;
×
36
    this.fileContentType = builder.fileContentType;
×
37
  }
×
38

39
  public UploadWithPreflightCheckRequestBodyAttributesField getAttributes() {
40
    return attributes;
1✔
41
  }
42

43
  public InputStream getFile() {
44
    return file;
1✔
45
  }
46

47
  public String getFileFileName() {
48
    return fileFileName;
1✔
49
  }
50

51
  public String getFileContentType() {
52
    return fileContentType;
1✔
53
  }
54

55
  public static class Builder {
56

57
    protected final UploadWithPreflightCheckRequestBodyAttributesField attributes;
58

59
    protected final InputStream file;
60

61
    protected String fileFileName;
62

63
    protected String fileContentType;
64

65
    public Builder(
66
        UploadWithPreflightCheckRequestBodyAttributesField attributes, InputStream file) {
×
67
      this.attributes = attributes;
×
68
      this.file = file;
×
69
    }
×
70

71
    public Builder fileFileName(String fileFileName) {
72
      this.fileFileName = fileFileName;
×
73
      return this;
×
74
    }
75

76
    public Builder fileContentType(String fileContentType) {
77
      this.fileContentType = fileContentType;
×
78
      return this;
×
79
    }
80

81
    public UploadWithPreflightCheckRequestBody build() {
82
      return new UploadWithPreflightCheckRequestBody(this);
×
83
    }
84
  }
85
}
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