001package com.box.sdkgen.schemas.v2025r0.externaluserdeletionresultv2025r0;
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/** Result of a single external user deletion request. */
010@JsonFilter("nullablePropertyFilter")
011public class ExternalUserDeletionResultV2025R0 extends SerializableObject {
012
013  /** The ID of the external user. */
014  @JsonProperty("user_id")
015  protected final String userId;
016
017  /** HTTP status code for a specific user's deletion request. */
018  protected final long status;
019
020  /**
021   * Deletion request status details. This property is only present when the deletion request is not
022   * successful.
023   */
024  protected String detail;
025
026  public ExternalUserDeletionResultV2025R0(
027      @JsonProperty("user_id") String userId, @JsonProperty("status") long status) {
028    super();
029    this.userId = userId;
030    this.status = status;
031  }
032
033  protected ExternalUserDeletionResultV2025R0(Builder builder) {
034    super();
035    this.userId = builder.userId;
036    this.status = builder.status;
037    this.detail = builder.detail;
038    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
039  }
040
041  public String getUserId() {
042    return userId;
043  }
044
045  public long getStatus() {
046    return status;
047  }
048
049  public String getDetail() {
050    return detail;
051  }
052
053  @Override
054  public boolean equals(Object o) {
055    if (this == o) {
056      return true;
057    }
058    if (o == null || getClass() != o.getClass()) {
059      return false;
060    }
061    ExternalUserDeletionResultV2025R0 casted = (ExternalUserDeletionResultV2025R0) o;
062    return Objects.equals(userId, casted.userId)
063        && Objects.equals(status, casted.status)
064        && Objects.equals(detail, casted.detail);
065  }
066
067  @Override
068  public int hashCode() {
069    return Objects.hash(userId, status, detail);
070  }
071
072  @Override
073  public String toString() {
074    return "ExternalUserDeletionResultV2025R0{"
075        + "userId='"
076        + userId
077        + '\''
078        + ", "
079        + "status='"
080        + status
081        + '\''
082        + ", "
083        + "detail='"
084        + detail
085        + '\''
086        + "}";
087  }
088
089  public static class Builder extends NullableFieldTracker {
090
091    protected final String userId;
092
093    protected final long status;
094
095    protected String detail;
096
097    public Builder(String userId, long status) {
098      super();
099      this.userId = userId;
100      this.status = status;
101    }
102
103    public Builder detail(String detail) {
104      this.detail = detail;
105      return this;
106    }
107
108    public ExternalUserDeletionResultV2025R0 build() {
109      return new ExternalUserDeletionResultV2025R0(this);
110    }
111  }
112}