001package com.box.sdkgen.managers.weblinks;
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@JsonFilter("nullablePropertyFilter")
010public class UpdateWebLinkByIdRequestBodyParentField extends SerializableObject {
011
012  /** The ID of parent item. */
013  protected String id;
014
015  /**
016   * The input for `user_id` is optional. Moving to non-root folder is not allowed when `user_id` is
017   * present. Parent folder id should be zero when `user_id` is provided.
018   */
019  @JsonProperty("user_id")
020  protected String userId;
021
022  public UpdateWebLinkByIdRequestBodyParentField() {
023    super();
024  }
025
026  protected UpdateWebLinkByIdRequestBodyParentField(Builder builder) {
027    super();
028    this.id = builder.id;
029    this.userId = builder.userId;
030    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
031  }
032
033  public String getId() {
034    return id;
035  }
036
037  public String getUserId() {
038    return userId;
039  }
040
041  @Override
042  public boolean equals(Object o) {
043    if (this == o) {
044      return true;
045    }
046    if (o == null || getClass() != o.getClass()) {
047      return false;
048    }
049    UpdateWebLinkByIdRequestBodyParentField casted = (UpdateWebLinkByIdRequestBodyParentField) o;
050    return Objects.equals(id, casted.id) && Objects.equals(userId, casted.userId);
051  }
052
053  @Override
054  public int hashCode() {
055    return Objects.hash(id, userId);
056  }
057
058  @Override
059  public String toString() {
060    return "UpdateWebLinkByIdRequestBodyParentField{"
061        + "id='"
062        + id
063        + '\''
064        + ", "
065        + "userId='"
066        + userId
067        + '\''
068        + "}";
069  }
070
071  public static class Builder extends NullableFieldTracker {
072
073    protected String id;
074
075    protected String userId;
076
077    public Builder id(String id) {
078      this.id = id;
079      return this;
080    }
081
082    public Builder userId(String userId) {
083      this.userId = userId;
084      return this;
085    }
086
087    public UpdateWebLinkByIdRequestBodyParentField build() {
088      return new UpdateWebLinkByIdRequestBodyParentField(this);
089    }
090  }
091}