001package com.box.sdkgen.schemas.v2025r0.listuserv2025r0;
002
003import com.box.sdkgen.internal.Nullable;
004import com.box.sdkgen.internal.NullableFieldTracker;
005import com.box.sdkgen.internal.SerializableObject;
006import com.fasterxml.jackson.annotation.JsonFilter;
007import java.util.Objects;
008
009/** A user in allowlist or denylist. */
010@JsonFilter("nullablePropertyFilter")
011public class ListUserV2025R0 extends SerializableObject {
012
013  /** The ID of the user. */
014  @Nullable protected Long id;
015
016  /** The name of the user. */
017  @Nullable protected String name;
018
019  /** The email of the user. */
020  @Nullable protected String email;
021
022  public ListUserV2025R0() {
023    super();
024  }
025
026  protected ListUserV2025R0(Builder builder) {
027    super();
028    this.id = builder.id;
029    this.name = builder.name;
030    this.email = builder.email;
031    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
032  }
033
034  public Long getId() {
035    return id;
036  }
037
038  public String getName() {
039    return name;
040  }
041
042  public String getEmail() {
043    return email;
044  }
045
046  @Override
047  public boolean equals(Object o) {
048    if (this == o) {
049      return true;
050    }
051    if (o == null || getClass() != o.getClass()) {
052      return false;
053    }
054    ListUserV2025R0 casted = (ListUserV2025R0) o;
055    return Objects.equals(id, casted.id)
056        && Objects.equals(name, casted.name)
057        && Objects.equals(email, casted.email);
058  }
059
060  @Override
061  public int hashCode() {
062    return Objects.hash(id, name, email);
063  }
064
065  @Override
066  public String toString() {
067    return "ListUserV2025R0{"
068        + "id='"
069        + id
070        + '\''
071        + ", "
072        + "name='"
073        + name
074        + '\''
075        + ", "
076        + "email='"
077        + email
078        + '\''
079        + "}";
080  }
081
082  public static class Builder extends NullableFieldTracker {
083
084    protected Long id;
085
086    protected String name;
087
088    protected String email;
089
090    public Builder id(Long id) {
091      this.id = id;
092      this.markNullableFieldAsSet("id");
093      return this;
094    }
095
096    public Builder name(String name) {
097      this.name = name;
098      this.markNullableFieldAsSet("name");
099      return this;
100    }
101
102    public Builder email(String email) {
103      this.email = email;
104      this.markNullableFieldAsSet("email");
105      return this;
106    }
107
108    public ListUserV2025R0 build() {
109      return new ListUserV2025R0(this);
110    }
111  }
112}