• 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

50.0
/src/main/java/com/box/sdkgen/managers/files/CopyFileRequestBody.java
1
package com.box.sdkgen.managers.files;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.fasterxml.jackson.annotation.JsonFilter;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import java.util.Objects;
8

9
@JsonFilter("nullablePropertyFilter")
10
public class CopyFileRequestBody extends SerializableObject {
11

12
  /**
13
   * An optional new name for the copied file.
14
   *
15
   * <p>There are some restrictions to the file name. Names containing non-printable ASCII
16
   * characters, forward and backward slashes (`/`, `\`), and protected names like `.` and `..` are
17
   * automatically sanitized by removing the non-allowed characters.
18
   */
19
  protected String name;
20

21
  /** An optional ID of the specific file version to copy. */
22
  protected String version;
23

24
  /** The destination folder to copy the file to. */
25
  protected final CopyFileRequestBodyParentField parent;
26

27
  public CopyFileRequestBody(@JsonProperty("parent") CopyFileRequestBodyParentField parent) {
28
    super();
×
29
    this.parent = parent;
×
30
  }
×
31

32
  protected CopyFileRequestBody(Builder builder) {
33
    super();
1✔
34
    this.name = builder.name;
1✔
35
    this.version = builder.version;
1✔
36
    this.parent = builder.parent;
1✔
37
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
38
  }
1✔
39

40
  public String getName() {
41
    return name;
1✔
42
  }
43

44
  public String getVersion() {
45
    return version;
1✔
46
  }
47

48
  public CopyFileRequestBodyParentField getParent() {
49
    return parent;
1✔
50
  }
51

52
  @Override
53
  public boolean equals(Object o) {
54
    if (this == o) {
×
55
      return true;
×
56
    }
57
    if (o == null || getClass() != o.getClass()) {
×
58
      return false;
×
59
    }
60
    CopyFileRequestBody casted = (CopyFileRequestBody) o;
×
61
    return Objects.equals(name, casted.name)
×
62
        && Objects.equals(version, casted.version)
×
63
        && Objects.equals(parent, casted.parent);
×
64
  }
65

66
  @Override
67
  public int hashCode() {
68
    return Objects.hash(name, version, parent);
×
69
  }
70

71
  @Override
72
  public String toString() {
73
    return "CopyFileRequestBody{"
×
74
        + "name='"
75
        + name
76
        + '\''
77
        + ", "
78
        + "version='"
79
        + version
80
        + '\''
81
        + ", "
82
        + "parent='"
83
        + parent
84
        + '\''
85
        + "}";
86
  }
87

88
  public static class Builder extends NullableFieldTracker {
89

90
    protected String name;
91

92
    protected String version;
93

94
    protected final CopyFileRequestBodyParentField parent;
95

96
    public Builder(CopyFileRequestBodyParentField parent) {
97
      super();
1✔
98
      this.parent = parent;
1✔
99
    }
1✔
100

101
    public Builder name(String name) {
102
      this.name = name;
1✔
103
      return this;
1✔
104
    }
105

106
    public Builder version(String version) {
107
      this.version = version;
×
108
      return this;
×
109
    }
110

111
    public CopyFileRequestBody build() {
112
      return new CopyFileRequestBody(this);
1✔
113
    }
114
  }
115
}
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