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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

0.0
/src/main/java/com/box/sdkgen/managers/files/UpdateFileByIdRequestBodySharedLinkField.java
1
package com.box.sdkgen.schemas.filefull;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.fileorfolderscope.FileOrFolderScope;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.List;
10
import java.util.Objects;
11

12
public class FileFullExpiringEmbedLinkField extends SerializableObject {
13

14
  @JsonProperty("access_token")
15
  protected String accessToken;
16

17
  @JsonProperty("expires_in")
18
  protected Long expiresIn;
19

20
  @JsonDeserialize(
21
      using =
22
          FileFullExpiringEmbedLinkTokenTypeField
23
              .FileFullExpiringEmbedLinkTokenTypeFieldDeserializer.class)
24
  @JsonSerialize(
25
      using =
26
          FileFullExpiringEmbedLinkTokenTypeField.FileFullExpiringEmbedLinkTokenTypeFieldSerializer
27
              .class)
28
  @JsonProperty("token_type")
29
  protected EnumWrapper<FileFullExpiringEmbedLinkTokenTypeField> tokenType;
30

31
  @JsonProperty("restricted_to")
32
  protected List<FileOrFolderScope> restrictedTo;
33

34
  protected String url;
35

36
  public FileFullExpiringEmbedLinkField() {
37
    super();
×
38
  }
×
39

40
  protected FileFullExpiringEmbedLinkField(Builder builder) {
41
    super();
×
42
    this.accessToken = builder.accessToken;
×
43
    this.expiresIn = builder.expiresIn;
×
44
    this.tokenType = builder.tokenType;
×
45
    this.restrictedTo = builder.restrictedTo;
×
46
    this.url = builder.url;
×
47
  }
×
48

49
  public String getAccessToken() {
50
    return accessToken;
×
51
  }
52

53
  public Long getExpiresIn() {
54
    return expiresIn;
×
55
  }
56

57
  public EnumWrapper<FileFullExpiringEmbedLinkTokenTypeField> getTokenType() {
58
    return tokenType;
×
59
  }
60

61
  public List<FileOrFolderScope> getRestrictedTo() {
62
    return restrictedTo;
×
63
  }
64

65
  public String getUrl() {
66
    return url;
×
67
  }
68

69
  @Override
70
  public boolean equals(Object o) {
71
    if (this == o) {
×
72
      return true;
×
73
    }
74
    if (o == null || getClass() != o.getClass()) {
×
75
      return false;
×
76
    }
77
    FileFullExpiringEmbedLinkField casted = (FileFullExpiringEmbedLinkField) o;
×
78
    return Objects.equals(accessToken, casted.accessToken)
×
79
        && Objects.equals(expiresIn, casted.expiresIn)
×
80
        && Objects.equals(tokenType, casted.tokenType)
×
81
        && Objects.equals(restrictedTo, casted.restrictedTo)
×
82
        && Objects.equals(url, casted.url);
×
83
  }
84

85
  @Override
86
  public int hashCode() {
87
    return Objects.hash(accessToken, expiresIn, tokenType, restrictedTo, url);
×
88
  }
89

90
  @Override
91
  public String toString() {
92
    return "FileFullExpiringEmbedLinkField{"
×
93
        + "accessToken='"
94
        + accessToken
95
        + '\''
96
        + ", "
97
        + "expiresIn='"
98
        + expiresIn
99
        + '\''
100
        + ", "
101
        + "tokenType='"
102
        + tokenType
103
        + '\''
104
        + ", "
105
        + "restrictedTo='"
106
        + restrictedTo
107
        + '\''
108
        + ", "
109
        + "url='"
110
        + url
111
        + '\''
112
        + "}";
113
  }
114

NEW
115
  public static class Builder {
×
116

117
    protected String accessToken;
118

119
    protected Long expiresIn;
120

121
    protected EnumWrapper<FileFullExpiringEmbedLinkTokenTypeField> tokenType;
122

123
    protected List<FileOrFolderScope> restrictedTo;
124

125
    protected String url;
126

127
    public Builder accessToken(String accessToken) {
128
      this.accessToken = accessToken;
×
129
      return this;
×
130
    }
131

132
    public Builder expiresIn(Long expiresIn) {
133
      this.expiresIn = expiresIn;
×
134
      return this;
×
135
    }
136

137
    public Builder tokenType(FileFullExpiringEmbedLinkTokenTypeField tokenType) {
UNCOV
138
      this.tokenType = new EnumWrapper<FileFullExpiringEmbedLinkTokenTypeField>(tokenType);
×
139
      return this;
×
140
    }
141

142
    public Builder tokenType(EnumWrapper<FileFullExpiringEmbedLinkTokenTypeField> tokenType) {
UNCOV
143
      this.tokenType = tokenType;
×
144
      return this;
×
145
    }
146

147
    public Builder restrictedTo(List<FileOrFolderScope> restrictedTo) {
UNCOV
148
      this.restrictedTo = restrictedTo;
×
149
      return this;
×
150
    }
151

152
    public Builder url(String url) {
153
      this.url = url;
×
154
      return this;
×
155
    }
156

157
    public FileFullExpiringEmbedLinkField build() {
158
      return new FileFullExpiringEmbedLinkField(this);
×
159
    }
160
  }
161
}
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