• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #5538

06 Nov 2025 12:18PM UTC coverage: 13.292% (-0.02%) from 13.315%
#5538

Pull #1552

github

web-flow
Merge 158cb9946 into 7fe53b9a9
Pull Request #1552: docs(boxsdkgen): Modify Archive API (box/box-openapi#563)

0 of 115 new or added lines in 7 files covered. (0.0%)

1 existing line in 1 file now uncovered.

8368 of 62957 relevant lines covered (13.29%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/box/sdkgen/schemas/v2025r0/archivev2025r0/ArchiveV2025R0.java
1
package com.box.sdkgen.schemas.v2025r0.archivev2025r0;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.NullableFieldTracker;
5
import com.box.sdkgen.internal.SerializableObject;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Objects;
12

13
/**
14
 * An archive is a folder dedicated to storing content that is redundant, outdated, or trivial.
15
 * Content in an archive is not accessible to its owner and collaborators. To use this feature, you
16
 * must request GCM scope for your Box application.
17
 */
18
@JsonFilter("nullablePropertyFilter")
19
public class ArchiveV2025R0 extends SerializableObject {
20

21
  /** The unique identifier that represents an archive. */
22
  protected final String id;
23

24
  /** The value is always `archive`. */
25
  @JsonDeserialize(using = ArchiveV2025R0TypeField.ArchiveV2025R0TypeFieldDeserializer.class)
26
  @JsonSerialize(using = ArchiveV2025R0TypeField.ArchiveV2025R0TypeFieldSerializer.class)
27
  protected EnumWrapper<ArchiveV2025R0TypeField> type;
28

29
  /**
30
   * The name of the archive.
31
   *
32
   * <p>The following restrictions to the archive name apply: names containing non-printable ASCII
33
   * characters, forward and backward slashes (`/`, `\`), names with trailing spaces, and names `.`
34
   * and `..` are not allowed.
35
   */
36
  protected final String name;
37

38
  /** The size of the archive in bytes. */
39
  protected final long size;
40

41
  /** The description of the archive. */
42
  @Nullable protected String description;
43

44
  /** The part of an archive API response that describes the user who owns the archive. */
45
  @JsonProperty("owned_by")
46
  protected ArchiveV2025R0OwnedByField ownedBy;
47

48
  public ArchiveV2025R0(
49
      @JsonProperty("id") String id,
50
      @JsonProperty("name") String name,
51
      @JsonProperty("size") long size) {
52
    super();
×
53
    this.id = id;
×
54
    this.name = name;
×
55
    this.size = size;
×
56
    this.type = new EnumWrapper<ArchiveV2025R0TypeField>(ArchiveV2025R0TypeField.ARCHIVE);
×
57
  }
×
58

59
  protected ArchiveV2025R0(Builder builder) {
60
    super();
×
61
    this.id = builder.id;
×
62
    this.type = builder.type;
×
63
    this.name = builder.name;
×
64
    this.size = builder.size;
×
NEW
65
    this.description = builder.description;
×
NEW
66
    this.ownedBy = builder.ownedBy;
×
67
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
68
  }
×
69

70
  public String getId() {
71
    return id;
×
72
  }
73

74
  public EnumWrapper<ArchiveV2025R0TypeField> getType() {
75
    return type;
×
76
  }
77

78
  public String getName() {
79
    return name;
×
80
  }
81

82
  public long getSize() {
83
    return size;
×
84
  }
85

86
  public String getDescription() {
NEW
87
    return description;
×
88
  }
89

90
  public ArchiveV2025R0OwnedByField getOwnedBy() {
NEW
91
    return ownedBy;
×
92
  }
93

94
  @Override
95
  public boolean equals(Object o) {
96
    if (this == o) {
×
97
      return true;
×
98
    }
99
    if (o == null || getClass() != o.getClass()) {
×
100
      return false;
×
101
    }
102
    ArchiveV2025R0 casted = (ArchiveV2025R0) o;
×
103
    return Objects.equals(id, casted.id)
×
104
        && Objects.equals(type, casted.type)
×
105
        && Objects.equals(name, casted.name)
×
NEW
106
        && Objects.equals(size, casted.size)
×
NEW
107
        && Objects.equals(description, casted.description)
×
NEW
108
        && Objects.equals(ownedBy, casted.ownedBy);
×
109
  }
110

111
  @Override
112
  public int hashCode() {
NEW
113
    return Objects.hash(id, type, name, size, description, ownedBy);
×
114
  }
115

116
  @Override
117
  public String toString() {
118
    return "ArchiveV2025R0{"
×
119
        + "id='"
120
        + id
121
        + '\''
122
        + ", "
123
        + "type='"
124
        + type
125
        + '\''
126
        + ", "
127
        + "name='"
128
        + name
129
        + '\''
130
        + ", "
131
        + "size='"
132
        + size
133
        + '\''
134
        + ", "
135
        + "description='"
136
        + description
137
        + '\''
138
        + ", "
139
        + "ownedBy='"
140
        + ownedBy
141
        + '\''
142
        + "}";
143
  }
144

145
  public static class Builder extends NullableFieldTracker {
146

147
    protected final String id;
148

149
    protected EnumWrapper<ArchiveV2025R0TypeField> type;
150

151
    protected final String name;
152

153
    protected final long size;
154

155
    protected String description;
156

157
    protected ArchiveV2025R0OwnedByField ownedBy;
158

159
    public Builder(String id, String name, long size) {
160
      super();
×
161
      this.id = id;
×
162
      this.name = name;
×
163
      this.size = size;
×
164
      this.type = new EnumWrapper<ArchiveV2025R0TypeField>(ArchiveV2025R0TypeField.ARCHIVE);
×
165
    }
×
166

167
    public Builder type(ArchiveV2025R0TypeField type) {
168
      this.type = new EnumWrapper<ArchiveV2025R0TypeField>(type);
×
169
      return this;
×
170
    }
171

172
    public Builder type(EnumWrapper<ArchiveV2025R0TypeField> type) {
173
      this.type = type;
×
174
      return this;
×
175
    }
176

177
    public Builder description(String description) {
NEW
178
      this.description = description;
×
NEW
179
      this.markNullableFieldAsSet("description");
×
NEW
180
      return this;
×
181
    }
182

183
    public Builder ownedBy(ArchiveV2025R0OwnedByField ownedBy) {
NEW
184
      this.ownedBy = ownedBy;
×
NEW
185
      return this;
×
186
    }
187

188
    public ArchiveV2025R0 build() {
189
      return new ArchiveV2025R0(this);
×
190
    }
191
  }
192
}
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

© 2025 Coveralls, Inc