001package com.box.sdkgen.managers.comments; 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@JsonFilter("nullablePropertyFilter") 012public class CreateCommentRequestBodyItemField extends SerializableObject { 013 014 /** The ID of the item. */ 015 protected final String id; 016 017 /** The type of the item that this comment will be placed on. */ 018 @JsonDeserialize( 019 using = 020 CreateCommentRequestBodyItemTypeField.CreateCommentRequestBodyItemTypeFieldDeserializer 021 .class) 022 @JsonSerialize( 023 using = 024 CreateCommentRequestBodyItemTypeField.CreateCommentRequestBodyItemTypeFieldSerializer 025 .class) 026 protected final EnumWrapper<CreateCommentRequestBodyItemTypeField> type; 027 028 public CreateCommentRequestBodyItemField(String id, CreateCommentRequestBodyItemTypeField type) { 029 super(); 030 this.id = id; 031 this.type = new EnumWrapper<CreateCommentRequestBodyItemTypeField>(type); 032 } 033 034 public CreateCommentRequestBodyItemField( 035 @JsonProperty("id") String id, 036 @JsonProperty("type") EnumWrapper<CreateCommentRequestBodyItemTypeField> type) { 037 super(); 038 this.id = id; 039 this.type = type; 040 } 041 042 public String getId() { 043 return id; 044 } 045 046 public EnumWrapper<CreateCommentRequestBodyItemTypeField> getType() { 047 return type; 048 } 049 050 @Override 051 public boolean equals(Object o) { 052 if (this == o) { 053 return true; 054 } 055 if (o == null || getClass() != o.getClass()) { 056 return false; 057 } 058 CreateCommentRequestBodyItemField casted = (CreateCommentRequestBodyItemField) o; 059 return Objects.equals(id, casted.id) && Objects.equals(type, casted.type); 060 } 061 062 @Override 063 public int hashCode() { 064 return Objects.hash(id, type); 065 } 066 067 @Override 068 public String toString() { 069 return "CreateCommentRequestBodyItemField{" 070 + "id='" 071 + id 072 + '\'' 073 + ", " 074 + "type='" 075 + type 076 + '\'' 077 + "}"; 078 } 079}