001package com.box.sdkgen.schemas.v2025r0.docgenjobbasev2025r0;
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/** The basic representation of a Box Doc Gen job. */
013@JsonFilter("nullablePropertyFilter")
014public class DocGenJobBaseV2025R0 extends SerializableObject {
015
016  /** The unique identifier that represent a Box Doc Gen job. */
017  protected final String id;
018
019  /** The value will always be `docgen_job`. */
020  @JsonDeserialize(
021      using = DocGenJobBaseV2025R0TypeField.DocGenJobBaseV2025R0TypeFieldDeserializer.class)
022  @JsonSerialize(
023      using = DocGenJobBaseV2025R0TypeField.DocGenJobBaseV2025R0TypeFieldSerializer.class)
024  protected EnumWrapper<DocGenJobBaseV2025R0TypeField> type;
025
026  public DocGenJobBaseV2025R0(@JsonProperty("id") String id) {
027    super();
028    this.id = id;
029    this.type =
030        new EnumWrapper<DocGenJobBaseV2025R0TypeField>(DocGenJobBaseV2025R0TypeField.DOCGEN_JOB);
031  }
032
033  protected DocGenJobBaseV2025R0(Builder builder) {
034    super();
035    this.id = builder.id;
036    this.type = builder.type;
037    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
038  }
039
040  public String getId() {
041    return id;
042  }
043
044  public EnumWrapper<DocGenJobBaseV2025R0TypeField> getType() {
045    return type;
046  }
047
048  @Override
049  public boolean equals(Object o) {
050    if (this == o) {
051      return true;
052    }
053    if (o == null || getClass() != o.getClass()) {
054      return false;
055    }
056    DocGenJobBaseV2025R0 casted = (DocGenJobBaseV2025R0) o;
057    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
058  }
059
060  @Override
061  public int hashCode() {
062    return Objects.hash(id, type);
063  }
064
065  @Override
066  public String toString() {
067    return "DocGenJobBaseV2025R0{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
068  }
069
070  public static class Builder extends NullableFieldTracker {
071
072    protected final String id;
073
074    protected EnumWrapper<DocGenJobBaseV2025R0TypeField> type;
075
076    public Builder(String id) {
077      super();
078      this.id = id;
079    }
080
081    public Builder type(DocGenJobBaseV2025R0TypeField type) {
082      this.type = new EnumWrapper<DocGenJobBaseV2025R0TypeField>(type);
083      return this;
084    }
085
086    public Builder type(EnumWrapper<DocGenJobBaseV2025R0TypeField> type) {
087      this.type = type;
088      return this;
089    }
090
091    public DocGenJobBaseV2025R0 build() {
092      if (this.type == null) {
093        this.type =
094            new EnumWrapper<DocGenJobBaseV2025R0TypeField>(
095                DocGenJobBaseV2025R0TypeField.DOCGEN_JOB);
096      }
097      return new DocGenJobBaseV2025R0(this);
098    }
099  }
100}