001package com.box.sdkgen.schemas.v2026r0.notesconvertresponsev2026r0;
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.annotation.JsonProperty;
008import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
009import com.fasterxml.jackson.databind.annotation.JsonSerialize;
010import java.util.Objects;
011
012/** Identifies the created Box Note file. */
013@JsonFilter("nullablePropertyFilter")
014public class NotesConvertResponseV2026R0 extends SerializableObject {
015
016  /** The Box resource type; always `file` for a Box file. */
017  @JsonDeserialize(
018      using =
019          NotesConvertResponseV2026R0TypeField.NotesConvertResponseV2026R0TypeFieldDeserializer
020              .class)
021  @JsonSerialize(
022      using =
023          NotesConvertResponseV2026R0TypeField.NotesConvertResponseV2026R0TypeFieldSerializer.class)
024  protected EnumWrapper<NotesConvertResponseV2026R0TypeField> type;
025
026  /** Box file ID of the created `.boxnote` file. */
027  protected final String id;
028
029  public NotesConvertResponseV2026R0(@JsonProperty("id") String id) {
030    super();
031    this.id = id;
032    this.type =
033        new EnumWrapper<NotesConvertResponseV2026R0TypeField>(
034            NotesConvertResponseV2026R0TypeField.FILE);
035  }
036
037  protected NotesConvertResponseV2026R0(Builder builder) {
038    super();
039    this.type = builder.type;
040    this.id = builder.id;
041    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
042  }
043
044  public EnumWrapper<NotesConvertResponseV2026R0TypeField> getType() {
045    return type;
046  }
047
048  public String getId() {
049    return id;
050  }
051
052  @Override
053  public boolean equals(Object o) {
054    if (this == o) {
055      return true;
056    }
057    if (o == null || getClass() != o.getClass()) {
058      return false;
059    }
060    NotesConvertResponseV2026R0 casted = (NotesConvertResponseV2026R0) o;
061    return Objects.equals(type, casted.type) && Objects.equals(id, casted.id);
062  }
063
064  @Override
065  public int hashCode() {
066    return Objects.hash(type, id);
067  }
068
069  @Override
070  public String toString() {
071    return "NotesConvertResponseV2026R0{"
072        + "type='"
073        + type
074        + '\''
075        + ", "
076        + "id='"
077        + id
078        + '\''
079        + "}";
080  }
081
082  public static class Builder extends NullableFieldTracker {
083
084    protected EnumWrapper<NotesConvertResponseV2026R0TypeField> type;
085
086    protected final String id;
087
088    public Builder(String id) {
089      super();
090      this.id = id;
091    }
092
093    public Builder type(NotesConvertResponseV2026R0TypeField type) {
094      this.type = new EnumWrapper<NotesConvertResponseV2026R0TypeField>(type);
095      return this;
096    }
097
098    public Builder type(EnumWrapper<NotesConvertResponseV2026R0TypeField> type) {
099      this.type = type;
100      return this;
101    }
102
103    public NotesConvertResponseV2026R0 build() {
104      if (this.type == null) {
105        this.type =
106            new EnumWrapper<NotesConvertResponseV2026R0TypeField>(
107                NotesConvertResponseV2026R0TypeField.FILE);
108      }
109      return new NotesConvertResponseV2026R0(this);
110    }
111  }
112}