001package com.box.sdkgen.schemas.aiagentask; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.schemas.aiagentbasictexttool.AiAgentBasicTextTool; 006import com.box.sdkgen.schemas.aiagentlongtexttool.AiAgentLongTextTool; 007import com.box.sdkgen.schemas.aiagentspreadsheettool.AiAgentSpreadsheetTool; 008import com.box.sdkgen.serialization.json.EnumWrapper; 009import com.fasterxml.jackson.annotation.JsonFilter; 010import com.fasterxml.jackson.annotation.JsonProperty; 011import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 012import com.fasterxml.jackson.databind.annotation.JsonSerialize; 013import java.util.Objects; 014 015/** The AI agent used to handle queries. */ 016@JsonFilter("nullablePropertyFilter") 017public class AiAgentAsk extends SerializableObject { 018 019 /** The type of AI agent used to handle queries. */ 020 @JsonDeserialize(using = AiAgentAskTypeField.AiAgentAskTypeFieldDeserializer.class) 021 @JsonSerialize(using = AiAgentAskTypeField.AiAgentAskTypeFieldSerializer.class) 022 protected EnumWrapper<AiAgentAskTypeField> type; 023 024 @JsonProperty("long_text") 025 protected AiAgentLongTextTool longText; 026 027 @JsonProperty("basic_text") 028 protected AiAgentBasicTextTool basicText; 029 030 protected AiAgentSpreadsheetTool spreadsheet; 031 032 @JsonProperty("long_text_multi") 033 protected AiAgentLongTextTool longTextMulti; 034 035 @JsonProperty("basic_text_multi") 036 protected AiAgentBasicTextTool basicTextMulti; 037 038 @JsonProperty("basic_image") 039 protected AiAgentBasicTextTool basicImage; 040 041 @JsonProperty("basic_image_multi") 042 protected AiAgentBasicTextTool basicImageMulti; 043 044 public AiAgentAsk() { 045 super(); 046 this.type = new EnumWrapper<AiAgentAskTypeField>(AiAgentAskTypeField.AI_AGENT_ASK); 047 } 048 049 protected AiAgentAsk(Builder builder) { 050 super(); 051 this.type = builder.type; 052 this.longText = builder.longText; 053 this.basicText = builder.basicText; 054 this.spreadsheet = builder.spreadsheet; 055 this.longTextMulti = builder.longTextMulti; 056 this.basicTextMulti = builder.basicTextMulti; 057 this.basicImage = builder.basicImage; 058 this.basicImageMulti = builder.basicImageMulti; 059 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 060 } 061 062 public EnumWrapper<AiAgentAskTypeField> getType() { 063 return type; 064 } 065 066 public AiAgentLongTextTool getLongText() { 067 return longText; 068 } 069 070 public AiAgentBasicTextTool getBasicText() { 071 return basicText; 072 } 073 074 public AiAgentSpreadsheetTool getSpreadsheet() { 075 return spreadsheet; 076 } 077 078 public AiAgentLongTextTool getLongTextMulti() { 079 return longTextMulti; 080 } 081 082 public AiAgentBasicTextTool getBasicTextMulti() { 083 return basicTextMulti; 084 } 085 086 public AiAgentBasicTextTool getBasicImage() { 087 return basicImage; 088 } 089 090 public AiAgentBasicTextTool getBasicImageMulti() { 091 return basicImageMulti; 092 } 093 094 @Override 095 public boolean equals(Object o) { 096 if (this == o) { 097 return true; 098 } 099 if (o == null || getClass() != o.getClass()) { 100 return false; 101 } 102 AiAgentAsk casted = (AiAgentAsk) o; 103 return Objects.equals(type, casted.type) 104 && Objects.equals(longText, casted.longText) 105 && Objects.equals(basicText, casted.basicText) 106 && Objects.equals(spreadsheet, casted.spreadsheet) 107 && Objects.equals(longTextMulti, casted.longTextMulti) 108 && Objects.equals(basicTextMulti, casted.basicTextMulti) 109 && Objects.equals(basicImage, casted.basicImage) 110 && Objects.equals(basicImageMulti, casted.basicImageMulti); 111 } 112 113 @Override 114 public int hashCode() { 115 return Objects.hash( 116 type, 117 longText, 118 basicText, 119 spreadsheet, 120 longTextMulti, 121 basicTextMulti, 122 basicImage, 123 basicImageMulti); 124 } 125 126 @Override 127 public String toString() { 128 return "AiAgentAsk{" 129 + "type='" 130 + type 131 + '\'' 132 + ", " 133 + "longText='" 134 + longText 135 + '\'' 136 + ", " 137 + "basicText='" 138 + basicText 139 + '\'' 140 + ", " 141 + "spreadsheet='" 142 + spreadsheet 143 + '\'' 144 + ", " 145 + "longTextMulti='" 146 + longTextMulti 147 + '\'' 148 + ", " 149 + "basicTextMulti='" 150 + basicTextMulti 151 + '\'' 152 + ", " 153 + "basicImage='" 154 + basicImage 155 + '\'' 156 + ", " 157 + "basicImageMulti='" 158 + basicImageMulti 159 + '\'' 160 + "}"; 161 } 162 163 public static class Builder extends NullableFieldTracker { 164 165 protected EnumWrapper<AiAgentAskTypeField> type; 166 167 protected AiAgentLongTextTool longText; 168 169 protected AiAgentBasicTextTool basicText; 170 171 protected AiAgentSpreadsheetTool spreadsheet; 172 173 protected AiAgentLongTextTool longTextMulti; 174 175 protected AiAgentBasicTextTool basicTextMulti; 176 177 protected AiAgentBasicTextTool basicImage; 178 179 protected AiAgentBasicTextTool basicImageMulti; 180 181 public Builder() { 182 super(); 183 } 184 185 public Builder type(AiAgentAskTypeField type) { 186 this.type = new EnumWrapper<AiAgentAskTypeField>(type); 187 return this; 188 } 189 190 public Builder type(EnumWrapper<AiAgentAskTypeField> type) { 191 this.type = type; 192 return this; 193 } 194 195 public Builder longText(AiAgentLongTextTool longText) { 196 this.longText = longText; 197 return this; 198 } 199 200 public Builder basicText(AiAgentBasicTextTool basicText) { 201 this.basicText = basicText; 202 return this; 203 } 204 205 public Builder spreadsheet(AiAgentSpreadsheetTool spreadsheet) { 206 this.spreadsheet = spreadsheet; 207 return this; 208 } 209 210 public Builder longTextMulti(AiAgentLongTextTool longTextMulti) { 211 this.longTextMulti = longTextMulti; 212 return this; 213 } 214 215 public Builder basicTextMulti(AiAgentBasicTextTool basicTextMulti) { 216 this.basicTextMulti = basicTextMulti; 217 return this; 218 } 219 220 public Builder basicImage(AiAgentBasicTextTool basicImage) { 221 this.basicImage = basicImage; 222 return this; 223 } 224 225 public Builder basicImageMulti(AiAgentBasicTextTool basicImageMulti) { 226 this.basicImageMulti = basicImageMulti; 227 return this; 228 } 229 230 public AiAgentAsk build() { 231 if (this.type == null) { 232 this.type = new EnumWrapper<AiAgentAskTypeField>(AiAgentAskTypeField.AI_AGENT_ASK); 233 } 234 return new AiAgentAsk(this); 235 } 236 } 237}