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