001package com.box.sdkgen.schemas.v2025r0.docgenbatchcreaterequestv2025r0; 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@JsonFilter("nullablePropertyFilter") 013public class DocGenBatchCreateRequestV2025R0DestinationFolderField extends SerializableObject { 014 015 /** The value will always be `folder`. */ 016 @JsonDeserialize( 017 using = 018 DocGenBatchCreateRequestV2025R0DestinationFolderTypeField 019 .DocGenBatchCreateRequestV2025R0DestinationFolderTypeFieldDeserializer.class) 020 @JsonSerialize( 021 using = 022 DocGenBatchCreateRequestV2025R0DestinationFolderTypeField 023 .DocGenBatchCreateRequestV2025R0DestinationFolderTypeFieldSerializer.class) 024 protected EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField> type; 025 026 /** ID of the folder. */ 027 protected final String id; 028 029 public DocGenBatchCreateRequestV2025R0DestinationFolderField(@JsonProperty("id") String id) { 030 super(); 031 this.id = id; 032 this.type = 033 new EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField>( 034 DocGenBatchCreateRequestV2025R0DestinationFolderTypeField.FOLDER); 035 } 036 037 protected DocGenBatchCreateRequestV2025R0DestinationFolderField(Builder builder) { 038 super(); 039 this.type = builder.type; 040 this.id = builder.id; 041 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 042 } 043 044 public EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField> 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 DocGenBatchCreateRequestV2025R0DestinationFolderField casted = 061 (DocGenBatchCreateRequestV2025R0DestinationFolderField) o; 062 return Objects.equals(type, casted.type) && Objects.equals(id, casted.id); 063 } 064 065 @Override 066 public int hashCode() { 067 return Objects.hash(type, id); 068 } 069 070 @Override 071 public String toString() { 072 return "DocGenBatchCreateRequestV2025R0DestinationFolderField{" 073 + "type='" 074 + type 075 + '\'' 076 + ", " 077 + "id='" 078 + id 079 + '\'' 080 + "}"; 081 } 082 083 public static class Builder extends NullableFieldTracker { 084 085 protected EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField> type; 086 087 protected final String id; 088 089 public Builder(String id) { 090 super(); 091 this.id = id; 092 } 093 094 public Builder type(DocGenBatchCreateRequestV2025R0DestinationFolderTypeField type) { 095 this.type = new EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField>(type); 096 return this; 097 } 098 099 public Builder type( 100 EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField> type) { 101 this.type = type; 102 return this; 103 } 104 105 public DocGenBatchCreateRequestV2025R0DestinationFolderField build() { 106 if (this.type == null) { 107 this.type = 108 new EnumWrapper<DocGenBatchCreateRequestV2025R0DestinationFolderTypeField>( 109 DocGenBatchCreateRequestV2025R0DestinationFolderTypeField.FOLDER); 110 } 111 return new DocGenBatchCreateRequestV2025R0DestinationFolderField(this); 112 } 113 } 114}