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

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

10
public class CreateTermsOfServiceRequestBody extends SerializableObject {
11

12
  @JsonDeserialize(
13
      using =
14
          CreateTermsOfServiceRequestBodyStatusField
15
              .CreateTermsOfServiceRequestBodyStatusFieldDeserializer.class)
16
  @JsonSerialize(
17
      using =
18
          CreateTermsOfServiceRequestBodyStatusField
19
              .CreateTermsOfServiceRequestBodyStatusFieldSerializer.class)
20
  protected final EnumWrapper<CreateTermsOfServiceRequestBodyStatusField> status;
21

22
  @JsonDeserialize(
23
      using =
24
          CreateTermsOfServiceRequestBodyTosTypeField
25
              .CreateTermsOfServiceRequestBodyTosTypeFieldDeserializer.class)
26
  @JsonSerialize(
27
      using =
28
          CreateTermsOfServiceRequestBodyTosTypeField
29
              .CreateTermsOfServiceRequestBodyTosTypeFieldSerializer.class)
30
  @JsonProperty("tos_type")
31
  protected EnumWrapper<CreateTermsOfServiceRequestBodyTosTypeField> tosType;
32

33
  protected final String text;
34

35
  public CreateTermsOfServiceRequestBody(
36
      @JsonProperty("status") EnumWrapper<CreateTermsOfServiceRequestBodyStatusField> status,
37
      @JsonProperty("text") String text) {
38
    super();
×
39
    this.status = status;
×
40
    this.text = text;
×
41
  }
×
42

43
  public CreateTermsOfServiceRequestBody(
44
      CreateTermsOfServiceRequestBodyStatusField status, String text) {
45
    super();
×
46
    this.status = new EnumWrapper<CreateTermsOfServiceRequestBodyStatusField>(status);
×
47
    this.text = text;
×
48
  }
×
49

50
  protected CreateTermsOfServiceRequestBody(Builder builder) {
51
    super();
×
52
    this.status = builder.status;
×
53
    this.tosType = builder.tosType;
×
54
    this.text = builder.text;
×
55
  }
×
56

57
  public EnumWrapper<CreateTermsOfServiceRequestBodyStatusField> getStatus() {
58
    return status;
×
59
  }
60

61
  public EnumWrapper<CreateTermsOfServiceRequestBodyTosTypeField> getTosType() {
62
    return tosType;
×
63
  }
64

65
  public String getText() {
66
    return text;
×
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
    CreateTermsOfServiceRequestBody casted = (CreateTermsOfServiceRequestBody) o;
×
78
    return Objects.equals(status, casted.status)
×
79
        && Objects.equals(tosType, casted.tosType)
×
80
        && Objects.equals(text, casted.text);
×
81
  }
82

83
  @Override
84
  public int hashCode() {
85
    return Objects.hash(status, tosType, text);
×
86
  }
87

88
  @Override
89
  public String toString() {
90
    return "CreateTermsOfServiceRequestBody{"
×
91
        + "status='"
92
        + status
93
        + '\''
94
        + ", "
95
        + "tosType='"
96
        + tosType
97
        + '\''
98
        + ", "
99
        + "text='"
100
        + text
101
        + '\''
102
        + "}";
103
  }
104

105
  public static class Builder {
106

107
    protected final EnumWrapper<CreateTermsOfServiceRequestBodyStatusField> status;
108

109
    protected EnumWrapper<CreateTermsOfServiceRequestBodyTosTypeField> tosType;
110

111
    protected final String text;
112

NEW
113
    public Builder(EnumWrapper<CreateTermsOfServiceRequestBodyStatusField> status, String text) {
×
114
      this.status = status;
×
115
      this.text = text;
×
116
    }
×
117

NEW
118
    public Builder(CreateTermsOfServiceRequestBodyStatusField status, String text) {
×
119
      this.status = new EnumWrapper<CreateTermsOfServiceRequestBodyStatusField>(status);
×
120
      this.text = text;
×
121
    }
×
122

123
    public Builder tosType(CreateTermsOfServiceRequestBodyTosTypeField tosType) {
UNCOV
124
      this.tosType = new EnumWrapper<CreateTermsOfServiceRequestBodyTosTypeField>(tosType);
×
125
      return this;
×
126
    }
127

128
    public Builder tosType(EnumWrapper<CreateTermsOfServiceRequestBodyTosTypeField> tosType) {
UNCOV
129
      this.tosType = tosType;
×
130
      return this;
×
131
    }
132

133
    public CreateTermsOfServiceRequestBody build() {
134
      return new CreateTermsOfServiceRequestBody(this);
×
135
    }
136
  }
137
}
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