• 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/UploadFileVersionRequestBody.java
1
package com.box.sdkgen.managers.uploads;
2

3
import java.io.InputStream;
4

5
public class UploadFileVersionRequestBody {
6

7
  /**
8
   * The additional attributes of the file being uploaded. Mainly the name and the parent folder.
9
   * These attributes are part of the multi part request body and are in JSON format.
10
   *
11
   * <p>&lt;Message warning&gt;
12
   *
13
   * <p>The `attributes` part of the body must come **before** the `file` part. Requests that do not
14
   * follow this format when uploading the file will receive a HTTP `400` error with a
15
   * `metadata_after_file_contents` error code.
16
   *
17
   * <p>&lt;/Message&gt;
18
   */
19
  public final UploadFileVersionRequestBodyAttributesField attributes;
20

21
  /**
22
   * The content of the file to upload to Box.
23
   *
24
   * <p>&lt;Message warning&gt;
25
   *
26
   * <p>The `attributes` part of the body must come **before** the `file` part. Requests that do not
27
   * follow this format when uploading the file will receive a HTTP `400` error with a
28
   * `metadata_after_file_contents` error code.
29
   *
30
   * <p>&lt;/Message&gt;
31
   */
32
  public final InputStream file;
33

34
  public String fileFileName;
35

36
  public String fileContentType;
37

38
  public UploadFileVersionRequestBody(
39
      UploadFileVersionRequestBodyAttributesField attributes, InputStream file) {
1✔
40
    this.attributes = attributes;
1✔
41
    this.file = file;
1✔
42
  }
1✔
43

44
  protected UploadFileVersionRequestBody(Builder builder) {
×
45
    this.attributes = builder.attributes;
×
46
    this.file = builder.file;
×
47
    this.fileFileName = builder.fileFileName;
×
48
    this.fileContentType = builder.fileContentType;
×
49
  }
×
50

51
  public UploadFileVersionRequestBodyAttributesField getAttributes() {
52
    return attributes;
1✔
53
  }
54

55
  public InputStream getFile() {
56
    return file;
1✔
57
  }
58

59
  public String getFileFileName() {
60
    return fileFileName;
1✔
61
  }
62

63
  public String getFileContentType() {
64
    return fileContentType;
1✔
65
  }
66

67
  public static class Builder {
68

69
    protected final UploadFileVersionRequestBodyAttributesField attributes;
70

71
    protected final InputStream file;
72

73
    protected String fileFileName;
74

75
    protected String fileContentType;
76

77
    public Builder(UploadFileVersionRequestBodyAttributesField attributes, InputStream file) {
×
78
      this.attributes = attributes;
×
79
      this.file = file;
×
80
    }
×
81

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

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

92
    public UploadFileVersionRequestBody build() {
93
      return new UploadFileVersionRequestBody(this);
×
94
    }
95
  }
96
}
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