001package com.box.sdkgen.schemas.v2025r0.hubitemoperationresultv2025r0; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.schemas.v2025r0.filereferencev2025r0.FileReferenceV2025R0; 006import com.box.sdkgen.schemas.v2025r0.folderreferencev2025r0.FolderReferenceV2025R0; 007import com.box.sdkgen.schemas.v2025r0.hubitemreferencev2025r0.HubItemReferenceV2025R0; 008import com.box.sdkgen.schemas.v2025r0.weblinkreferencev2025r0.WeblinkReferenceV2025R0; 009import com.fasterxml.jackson.annotation.JsonFilter; 010import com.fasterxml.jackson.annotation.JsonProperty; 011import java.util.Objects; 012 013/** Result of a Box Hub item operation. */ 014@JsonFilter("nullablePropertyFilter") 015public class HubItemOperationResultV2025R0 extends SerializableObject { 016 017 /** The action performed on the item. */ 018 protected String action; 019 020 protected HubItemReferenceV2025R0 item; 021 022 /** The ID of the parent block the item was added to. */ 023 @JsonProperty("parent_id") 024 protected String parentId; 025 026 /** The HTTP status code of the operation. */ 027 protected Long status; 028 029 /** Error message if the operation failed. */ 030 protected String error; 031 032 public HubItemOperationResultV2025R0() { 033 super(); 034 } 035 036 protected HubItemOperationResultV2025R0(Builder builder) { 037 super(); 038 this.action = builder.action; 039 this.item = builder.item; 040 this.parentId = builder.parentId; 041 this.status = builder.status; 042 this.error = builder.error; 043 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 044 } 045 046 public String getAction() { 047 return action; 048 } 049 050 public HubItemReferenceV2025R0 getItem() { 051 return item; 052 } 053 054 public String getParentId() { 055 return parentId; 056 } 057 058 public Long getStatus() { 059 return status; 060 } 061 062 public String getError() { 063 return error; 064 } 065 066 @Override 067 public boolean equals(Object o) { 068 if (this == o) { 069 return true; 070 } 071 if (o == null || getClass() != o.getClass()) { 072 return false; 073 } 074 HubItemOperationResultV2025R0 casted = (HubItemOperationResultV2025R0) o; 075 return Objects.equals(action, casted.action) 076 && Objects.equals(item, casted.item) 077 && Objects.equals(parentId, casted.parentId) 078 && Objects.equals(status, casted.status) 079 && Objects.equals(error, casted.error); 080 } 081 082 @Override 083 public int hashCode() { 084 return Objects.hash(action, item, parentId, status, error); 085 } 086 087 @Override 088 public String toString() { 089 return "HubItemOperationResultV2025R0{" 090 + "action='" 091 + action 092 + '\'' 093 + ", " 094 + "item='" 095 + item 096 + '\'' 097 + ", " 098 + "parentId='" 099 + parentId 100 + '\'' 101 + ", " 102 + "status='" 103 + status 104 + '\'' 105 + ", " 106 + "error='" 107 + error 108 + '\'' 109 + "}"; 110 } 111 112 public static class Builder extends NullableFieldTracker { 113 114 protected String action; 115 116 protected HubItemReferenceV2025R0 item; 117 118 protected String parentId; 119 120 protected Long status; 121 122 protected String error; 123 124 public Builder action(String action) { 125 this.action = action; 126 return this; 127 } 128 129 public Builder item(FileReferenceV2025R0 item) { 130 this.item = new HubItemReferenceV2025R0(item); 131 return this; 132 } 133 134 public Builder item(FolderReferenceV2025R0 item) { 135 this.item = new HubItemReferenceV2025R0(item); 136 return this; 137 } 138 139 public Builder item(WeblinkReferenceV2025R0 item) { 140 this.item = new HubItemReferenceV2025R0(item); 141 return this; 142 } 143 144 public Builder item(HubItemReferenceV2025R0 item) { 145 this.item = item; 146 return this; 147 } 148 149 public Builder parentId(String parentId) { 150 this.parentId = parentId; 151 return this; 152 } 153 154 public Builder status(Long status) { 155 this.status = status; 156 return this; 157 } 158 159 public Builder error(String error) { 160 this.error = error; 161 return this; 162 } 163 164 public HubItemOperationResultV2025R0 build() { 165 return new HubItemOperationResultV2025R0(this); 166 } 167 } 168}