001package com.box.sdkgen.schemas.signrequestsignerattachment;
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/** Metadata describing a file uploaded by a signer as an attachment. */
010@JsonFilter("nullablePropertyFilter")
011public class SignRequestSignerAttachment extends SerializableObject {
012
013  /** Identifier of the attachment file. */
014  @Nullable protected String id;
015
016  /** Display name of the attachment file. */
017  @Nullable protected String name;
018
019  public SignRequestSignerAttachment() {
020    super();
021  }
022
023  protected SignRequestSignerAttachment(Builder builder) {
024    super();
025    this.id = builder.id;
026    this.name = builder.name;
027    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
028  }
029
030  public String getId() {
031    return id;
032  }
033
034  public String getName() {
035    return name;
036  }
037
038  @Override
039  public boolean equals(Object o) {
040    if (this == o) {
041      return true;
042    }
043    if (o == null || getClass() != o.getClass()) {
044      return false;
045    }
046    SignRequestSignerAttachment casted = (SignRequestSignerAttachment) o;
047    return Objects.equals(id, casted.id) && Objects.equals(name, casted.name);
048  }
049
050  @Override
051  public int hashCode() {
052    return Objects.hash(id, name);
053  }
054
055  @Override
056  public String toString() {
057    return "SignRequestSignerAttachment{"
058        + "id='"
059        + id
060        + '\''
061        + ", "
062        + "name='"
063        + name
064        + '\''
065        + "}";
066  }
067
068  public static class Builder extends NullableFieldTracker {
069
070    protected String id;
071
072    protected String name;
073
074    public Builder id(String id) {
075      this.id = id;
076      this.markNullableFieldAsSet("id");
077      return this;
078    }
079
080    public Builder name(String name) {
081      this.name = name;
082      this.markNullableFieldAsSet("name");
083      return this;
084    }
085
086    public SignRequestSignerAttachment build() {
087      return new SignRequestSignerAttachment(this);
088    }
089  }
090}