001package com.box.sdkgen.schemas.v2025r0.hubupdaterequestv2025r0;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.box.sdkgen.serialization.json.EnumWrapper;
006import com.fasterxml.jackson.annotation.JsonFilter;
007import com.fasterxml.jackson.annotation.JsonProperty;
008import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
009import com.fasterxml.jackson.databind.annotation.JsonSerialize;
010import java.util.Objects;
011
012/** Request schema for updating an existing Box Hub. */
013@JsonFilter("nullablePropertyFilter")
014public class HubUpdateRequestV2025R0 extends SerializableObject {
015
016  /** Title of the Box Hub. It cannot be empty and should be less than 50 characters. */
017  protected String title;
018
019  /** Description of the Box Hub. */
020  protected String description;
021
022  /** Indicates if AI features are enabled for the Box Hub. */
023  @JsonProperty("is_ai_enabled")
024  protected Boolean isAiEnabled;
025
026  /** Indicates if collaboration is restricted to the enterprise. */
027  @JsonProperty("is_collaboration_restricted_to_enterprise")
028  protected Boolean isCollaborationRestrictedToEnterprise;
029
030  /** Indicates if non-owners can invite others to the Box Hub. */
031  @JsonProperty("can_non_owners_invite")
032  protected Boolean canNonOwnersInvite;
033
034  /** Indicates if a shared link can be created for the Box Hub. */
035  @JsonProperty("can_shared_link_be_created")
036  protected Boolean canSharedLinkBeCreated;
037
038  /** Indicates if a public shared link can be created for the Box Hub. */
039  @JsonProperty("can_public_shared_link_be_created")
040  protected Boolean canPublicSharedLinkBeCreated;
041
042  /**
043   * Specifies who is allowed to copy the Box Hub.
044   *
045   * <p>* `all` - Any user with access to the Hub can copy it. * `company` - Only users within the
046   * same enterprise as the Hub can copy it. * `none` - No one can copy the Hub.
047   */
048  @JsonDeserialize(
049      using =
050          HubUpdateRequestV2025R0CopyHubAccessField
051              .HubUpdateRequestV2025R0CopyHubAccessFieldDeserializer.class)
052  @JsonSerialize(
053      using =
054          HubUpdateRequestV2025R0CopyHubAccessField
055              .HubUpdateRequestV2025R0CopyHubAccessFieldSerializer.class)
056  @JsonProperty("copy_hub_access")
057  protected EnumWrapper<HubUpdateRequestV2025R0CopyHubAccessField> copyHubAccess;
058
059  public HubUpdateRequestV2025R0() {
060    super();
061  }
062
063  protected HubUpdateRequestV2025R0(Builder builder) {
064    super();
065    this.title = builder.title;
066    this.description = builder.description;
067    this.isAiEnabled = builder.isAiEnabled;
068    this.isCollaborationRestrictedToEnterprise = builder.isCollaborationRestrictedToEnterprise;
069    this.canNonOwnersInvite = builder.canNonOwnersInvite;
070    this.canSharedLinkBeCreated = builder.canSharedLinkBeCreated;
071    this.canPublicSharedLinkBeCreated = builder.canPublicSharedLinkBeCreated;
072    this.copyHubAccess = builder.copyHubAccess;
073    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
074  }
075
076  public String getTitle() {
077    return title;
078  }
079
080  public String getDescription() {
081    return description;
082  }
083
084  public Boolean getIsAiEnabled() {
085    return isAiEnabled;
086  }
087
088  public Boolean getIsCollaborationRestrictedToEnterprise() {
089    return isCollaborationRestrictedToEnterprise;
090  }
091
092  public Boolean getCanNonOwnersInvite() {
093    return canNonOwnersInvite;
094  }
095
096  public Boolean getCanSharedLinkBeCreated() {
097    return canSharedLinkBeCreated;
098  }
099
100  public Boolean getCanPublicSharedLinkBeCreated() {
101    return canPublicSharedLinkBeCreated;
102  }
103
104  public EnumWrapper<HubUpdateRequestV2025R0CopyHubAccessField> getCopyHubAccess() {
105    return copyHubAccess;
106  }
107
108  @Override
109  public boolean equals(Object o) {
110    if (this == o) {
111      return true;
112    }
113    if (o == null || getClass() != o.getClass()) {
114      return false;
115    }
116    HubUpdateRequestV2025R0 casted = (HubUpdateRequestV2025R0) o;
117    return Objects.equals(title, casted.title)
118        && Objects.equals(description, casted.description)
119        && Objects.equals(isAiEnabled, casted.isAiEnabled)
120        && Objects.equals(
121            isCollaborationRestrictedToEnterprise, casted.isCollaborationRestrictedToEnterprise)
122        && Objects.equals(canNonOwnersInvite, casted.canNonOwnersInvite)
123        && Objects.equals(canSharedLinkBeCreated, casted.canSharedLinkBeCreated)
124        && Objects.equals(canPublicSharedLinkBeCreated, casted.canPublicSharedLinkBeCreated)
125        && Objects.equals(copyHubAccess, casted.copyHubAccess);
126  }
127
128  @Override
129  public int hashCode() {
130    return Objects.hash(
131        title,
132        description,
133        isAiEnabled,
134        isCollaborationRestrictedToEnterprise,
135        canNonOwnersInvite,
136        canSharedLinkBeCreated,
137        canPublicSharedLinkBeCreated,
138        copyHubAccess);
139  }
140
141  @Override
142  public String toString() {
143    return "HubUpdateRequestV2025R0{"
144        + "title='"
145        + title
146        + '\''
147        + ", "
148        + "description='"
149        + description
150        + '\''
151        + ", "
152        + "isAiEnabled='"
153        + isAiEnabled
154        + '\''
155        + ", "
156        + "isCollaborationRestrictedToEnterprise='"
157        + isCollaborationRestrictedToEnterprise
158        + '\''
159        + ", "
160        + "canNonOwnersInvite='"
161        + canNonOwnersInvite
162        + '\''
163        + ", "
164        + "canSharedLinkBeCreated='"
165        + canSharedLinkBeCreated
166        + '\''
167        + ", "
168        + "canPublicSharedLinkBeCreated='"
169        + canPublicSharedLinkBeCreated
170        + '\''
171        + ", "
172        + "copyHubAccess='"
173        + copyHubAccess
174        + '\''
175        + "}";
176  }
177
178  public static class Builder extends NullableFieldTracker {
179
180    protected String title;
181
182    protected String description;
183
184    protected Boolean isAiEnabled;
185
186    protected Boolean isCollaborationRestrictedToEnterprise;
187
188    protected Boolean canNonOwnersInvite;
189
190    protected Boolean canSharedLinkBeCreated;
191
192    protected Boolean canPublicSharedLinkBeCreated;
193
194    protected EnumWrapper<HubUpdateRequestV2025R0CopyHubAccessField> copyHubAccess;
195
196    public Builder title(String title) {
197      this.title = title;
198      return this;
199    }
200
201    public Builder description(String description) {
202      this.description = description;
203      return this;
204    }
205
206    public Builder isAiEnabled(Boolean isAiEnabled) {
207      this.isAiEnabled = isAiEnabled;
208      return this;
209    }
210
211    public Builder isCollaborationRestrictedToEnterprise(
212        Boolean isCollaborationRestrictedToEnterprise) {
213      this.isCollaborationRestrictedToEnterprise = isCollaborationRestrictedToEnterprise;
214      return this;
215    }
216
217    public Builder canNonOwnersInvite(Boolean canNonOwnersInvite) {
218      this.canNonOwnersInvite = canNonOwnersInvite;
219      return this;
220    }
221
222    public Builder canSharedLinkBeCreated(Boolean canSharedLinkBeCreated) {
223      this.canSharedLinkBeCreated = canSharedLinkBeCreated;
224      return this;
225    }
226
227    public Builder canPublicSharedLinkBeCreated(Boolean canPublicSharedLinkBeCreated) {
228      this.canPublicSharedLinkBeCreated = canPublicSharedLinkBeCreated;
229      return this;
230    }
231
232    public Builder copyHubAccess(HubUpdateRequestV2025R0CopyHubAccessField copyHubAccess) {
233      this.copyHubAccess =
234          new EnumWrapper<HubUpdateRequestV2025R0CopyHubAccessField>(copyHubAccess);
235      return this;
236    }
237
238    public Builder copyHubAccess(
239        EnumWrapper<HubUpdateRequestV2025R0CopyHubAccessField> copyHubAccess) {
240      this.copyHubAccess = copyHubAccess;
241      return this;
242    }
243
244    public HubUpdateRequestV2025R0 build() {
245      return new HubUpdateRequestV2025R0(this);
246    }
247  }
248}