001package com.box.sdkgen.schemas.v2025r0.docgenbatchbasev2025r0; 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/** 013 * The basic representation of a Box Doc Gen batch object. A Box Doc Gen batch contains one or more 014 * Box Doc Gen jobs. 015 */ 016@JsonFilter("nullablePropertyFilter") 017public class DocGenBatchBaseV2025R0 extends SerializableObject { 018 019 /** The unique identifier that represents a Box Doc Gen batch. */ 020 protected final String id; 021 022 /** The value will always be `docgen_batch`. */ 023 @JsonDeserialize( 024 using = DocGenBatchBaseV2025R0TypeField.DocGenBatchBaseV2025R0TypeFieldDeserializer.class) 025 @JsonSerialize( 026 using = DocGenBatchBaseV2025R0TypeField.DocGenBatchBaseV2025R0TypeFieldSerializer.class) 027 protected EnumWrapper<DocGenBatchBaseV2025R0TypeField> type; 028 029 public DocGenBatchBaseV2025R0(@JsonProperty("id") String id) { 030 super(); 031 this.id = id; 032 this.type = 033 new EnumWrapper<DocGenBatchBaseV2025R0TypeField>( 034 DocGenBatchBaseV2025R0TypeField.DOCGEN_BATCH); 035 } 036 037 protected DocGenBatchBaseV2025R0(Builder builder) { 038 super(); 039 this.id = builder.id; 040 this.type = builder.type; 041 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 042 } 043 044 public String getId() { 045 return id; 046 } 047 048 public EnumWrapper<DocGenBatchBaseV2025R0TypeField> getType() { 049 return type; 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 DocGenBatchBaseV2025R0 casted = (DocGenBatchBaseV2025R0) o; 061 return Objects.equals(id, casted.id) && Objects.equals(type, casted.type); 062 } 063 064 @Override 065 public int hashCode() { 066 return Objects.hash(id, type); 067 } 068 069 @Override 070 public String toString() { 071 return "DocGenBatchBaseV2025R0{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}"; 072 } 073 074 public static class Builder extends NullableFieldTracker { 075 076 protected final String id; 077 078 protected EnumWrapper<DocGenBatchBaseV2025R0TypeField> type; 079 080 public Builder(String id) { 081 super(); 082 this.id = id; 083 } 084 085 public Builder type(DocGenBatchBaseV2025R0TypeField type) { 086 this.type = new EnumWrapper<DocGenBatchBaseV2025R0TypeField>(type); 087 return this; 088 } 089 090 public Builder type(EnumWrapper<DocGenBatchBaseV2025R0TypeField> type) { 091 this.type = type; 092 return this; 093 } 094 095 public DocGenBatchBaseV2025R0 build() { 096 if (this.type == null) { 097 this.type = 098 new EnumWrapper<DocGenBatchBaseV2025R0TypeField>( 099 DocGenBatchBaseV2025R0TypeField.DOCGEN_BATCH); 100 } 101 return new DocGenBatchBaseV2025R0(this); 102 } 103 } 104}