001package com.box.sdkgen.schemas.v2025r0.hubitemv2025r0; 002 003import com.box.sdkgen.internal.SerializableObject; 004import com.box.sdkgen.serialization.json.EnumWrapper; 005import com.fasterxml.jackson.annotation.JsonFilter; 006import com.fasterxml.jackson.annotation.JsonProperty; 007import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 008import com.fasterxml.jackson.databind.annotation.JsonSerialize; 009import java.util.Objects; 010 011/** A Box Hub Item is a Box Item that is referenced in a Box Hub. */ 012@JsonFilter("nullablePropertyFilter") 013public class HubItemV2025R0 extends SerializableObject { 014 015 /** The unique identifier for this item. */ 016 protected final String id; 017 018 /** The type of the item. */ 019 @JsonDeserialize(using = HubItemV2025R0TypeField.HubItemV2025R0TypeFieldDeserializer.class) 020 @JsonSerialize(using = HubItemV2025R0TypeField.HubItemV2025R0TypeFieldSerializer.class) 021 protected final EnumWrapper<HubItemV2025R0TypeField> type; 022 023 /** The name of the item. */ 024 protected final String name; 025 026 public HubItemV2025R0(String id, HubItemV2025R0TypeField type, String name) { 027 super(); 028 this.id = id; 029 this.type = new EnumWrapper<HubItemV2025R0TypeField>(type); 030 this.name = name; 031 } 032 033 public HubItemV2025R0( 034 @JsonProperty("id") String id, 035 @JsonProperty("type") EnumWrapper<HubItemV2025R0TypeField> type, 036 @JsonProperty("name") String name) { 037 super(); 038 this.id = id; 039 this.type = type; 040 this.name = name; 041 } 042 043 public String getId() { 044 return id; 045 } 046 047 public EnumWrapper<HubItemV2025R0TypeField> getType() { 048 return type; 049 } 050 051 public String getName() { 052 return name; 053 } 054 055 @Override 056 public boolean equals(Object o) { 057 if (this == o) { 058 return true; 059 } 060 if (o == null || getClass() != o.getClass()) { 061 return false; 062 } 063 HubItemV2025R0 casted = (HubItemV2025R0) o; 064 return Objects.equals(id, casted.id) 065 && Objects.equals(type, casted.type) 066 && Objects.equals(name, casted.name); 067 } 068 069 @Override 070 public int hashCode() { 071 return Objects.hash(id, type, name); 072 } 073 074 @Override 075 public String toString() { 076 return "HubItemV2025R0{" 077 + "id='" 078 + id 079 + '\'' 080 + ", " 081 + "type='" 082 + type 083 + '\'' 084 + ", " 085 + "name='" 086 + name 087 + '\'' 088 + "}"; 089 } 090}