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