001package com.box.sdkgen.schemas.trashfolder; 002 003import com.box.sdkgen.internal.Nullable; 004import com.box.sdkgen.internal.NullableFieldTracker; 005import com.box.sdkgen.internal.SerializableObject; 006import com.box.sdkgen.serialization.json.EnumWrapper; 007import com.fasterxml.jackson.annotation.JsonFilter; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 010import com.fasterxml.jackson.databind.annotation.JsonSerialize; 011import java.util.Objects; 012 013@JsonFilter("nullablePropertyFilter") 014public class TrashFolderPathCollectionEntriesField extends SerializableObject { 015 016 /** The value will always be `folder`. */ 017 @JsonDeserialize( 018 using = 019 TrashFolderPathCollectionEntriesTypeField 020 .TrashFolderPathCollectionEntriesTypeFieldDeserializer.class) 021 @JsonSerialize( 022 using = 023 TrashFolderPathCollectionEntriesTypeField 024 .TrashFolderPathCollectionEntriesTypeFieldSerializer.class) 025 protected EnumWrapper<TrashFolderPathCollectionEntriesTypeField> type; 026 027 /** The unique identifier that represent a folder. */ 028 protected String id; 029 030 /** This field is null for the Trash folder. */ 031 @JsonProperty("sequence_id") 032 @Nullable 033 protected String sequenceId; 034 035 /** This field is null for the Trash folder. */ 036 @Nullable protected String etag; 037 038 /** The name of the Trash folder. */ 039 protected String name; 040 041 public TrashFolderPathCollectionEntriesField() { 042 super(); 043 } 044 045 protected TrashFolderPathCollectionEntriesField(Builder builder) { 046 super(); 047 this.type = builder.type; 048 this.id = builder.id; 049 this.sequenceId = builder.sequenceId; 050 this.etag = builder.etag; 051 this.name = builder.name; 052 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 053 } 054 055 public EnumWrapper<TrashFolderPathCollectionEntriesTypeField> getType() { 056 return type; 057 } 058 059 public String getId() { 060 return id; 061 } 062 063 public String getSequenceId() { 064 return sequenceId; 065 } 066 067 public String getEtag() { 068 return etag; 069 } 070 071 public String getName() { 072 return name; 073 } 074 075 @Override 076 public boolean equals(Object o) { 077 if (this == o) { 078 return true; 079 } 080 if (o == null || getClass() != o.getClass()) { 081 return false; 082 } 083 TrashFolderPathCollectionEntriesField casted = (TrashFolderPathCollectionEntriesField) o; 084 return Objects.equals(type, casted.type) 085 && Objects.equals(id, casted.id) 086 && Objects.equals(sequenceId, casted.sequenceId) 087 && Objects.equals(etag, casted.etag) 088 && Objects.equals(name, casted.name); 089 } 090 091 @Override 092 public int hashCode() { 093 return Objects.hash(type, id, sequenceId, etag, name); 094 } 095 096 @Override 097 public String toString() { 098 return "TrashFolderPathCollectionEntriesField{" 099 + "type='" 100 + type 101 + '\'' 102 + ", " 103 + "id='" 104 + id 105 + '\'' 106 + ", " 107 + "sequenceId='" 108 + sequenceId 109 + '\'' 110 + ", " 111 + "etag='" 112 + etag 113 + '\'' 114 + ", " 115 + "name='" 116 + name 117 + '\'' 118 + "}"; 119 } 120 121 public static class Builder extends NullableFieldTracker { 122 123 protected EnumWrapper<TrashFolderPathCollectionEntriesTypeField> type; 124 125 protected String id; 126 127 protected String sequenceId; 128 129 protected String etag; 130 131 protected String name; 132 133 public Builder type(TrashFolderPathCollectionEntriesTypeField type) { 134 this.type = new EnumWrapper<TrashFolderPathCollectionEntriesTypeField>(type); 135 return this; 136 } 137 138 public Builder type(EnumWrapper<TrashFolderPathCollectionEntriesTypeField> type) { 139 this.type = type; 140 return this; 141 } 142 143 public Builder id(String id) { 144 this.id = id; 145 return this; 146 } 147 148 public Builder sequenceId(String sequenceId) { 149 this.sequenceId = sequenceId; 150 this.markNullableFieldAsSet("sequence_id"); 151 return this; 152 } 153 154 public Builder etag(String etag) { 155 this.etag = etag; 156 this.markNullableFieldAsSet("etag"); 157 return this; 158 } 159 160 public Builder name(String name) { 161 this.name = name; 162 return this; 163 } 164 165 public TrashFolderPathCollectionEntriesField build() { 166 return new TrashFolderPathCollectionEntriesField(this); 167 } 168 } 169}