001package com.box.sdkgen.schemas.aisingleagentresponsefull; 002 003import com.box.sdkgen.schemas.aiagentallowedentity.AiAgentAllowedEntity; 004import com.box.sdkgen.schemas.aisingleagentresponse.AiSingleAgentResponse; 005import com.box.sdkgen.schemas.aisingleagentresponse.AiSingleAgentResponseTypeField; 006import com.box.sdkgen.schemas.aistudioagentaskresponse.AiStudioAgentAskResponse; 007import com.box.sdkgen.schemas.aistudioagentextractresponse.AiStudioAgentExtractResponse; 008import com.box.sdkgen.schemas.aistudioagenttextgenresponse.AiStudioAgentTextGenResponse; 009import com.box.sdkgen.schemas.userbase.UserBase; 010import com.box.sdkgen.serialization.json.EnumWrapper; 011import com.fasterxml.jackson.annotation.JsonFilter; 012import com.fasterxml.jackson.annotation.JsonProperty; 013import java.time.OffsetDateTime; 014import java.util.List; 015import java.util.Objects; 016 017/** Full representation of an AI Agent instance. */ 018@JsonFilter("nullablePropertyFilter") 019public class AiSingleAgentResponseFull extends AiSingleAgentResponse { 020 021 protected AiStudioAgentAskResponse ask; 022 023 @JsonProperty("text_gen") 024 protected AiStudioAgentTextGenResponse textGen; 025 026 protected AiStudioAgentExtractResponse extract; 027 028 public AiSingleAgentResponseFull( 029 @JsonProperty("id") String id, 030 @JsonProperty("origin") String origin, 031 @JsonProperty("name") String name, 032 @JsonProperty("access_state") String accessState) { 033 super(id, origin, name, accessState); 034 } 035 036 protected AiSingleAgentResponseFull(Builder builder) { 037 super(builder); 038 this.ask = builder.ask; 039 this.textGen = builder.textGen; 040 this.extract = builder.extract; 041 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 042 } 043 044 public AiStudioAgentAskResponse getAsk() { 045 return ask; 046 } 047 048 public AiStudioAgentTextGenResponse getTextGen() { 049 return textGen; 050 } 051 052 public AiStudioAgentExtractResponse getExtract() { 053 return extract; 054 } 055 056 @Override 057 public boolean equals(Object o) { 058 if (this == o) { 059 return true; 060 } 061 if (o == null || getClass() != o.getClass()) { 062 return false; 063 } 064 AiSingleAgentResponseFull casted = (AiSingleAgentResponseFull) o; 065 return Objects.equals(id, casted.id) 066 && Objects.equals(type, casted.type) 067 && Objects.equals(origin, casted.origin) 068 && Objects.equals(name, casted.name) 069 && Objects.equals(accessState, casted.accessState) 070 && Objects.equals(createdBy, casted.createdBy) 071 && Objects.equals(createdAt, casted.createdAt) 072 && Objects.equals(modifiedBy, casted.modifiedBy) 073 && Objects.equals(modifiedAt, casted.modifiedAt) 074 && Objects.equals(iconReference, casted.iconReference) 075 && Objects.equals(allowedEntities, casted.allowedEntities) 076 && Objects.equals(ask, casted.ask) 077 && Objects.equals(textGen, casted.textGen) 078 && Objects.equals(extract, casted.extract); 079 } 080 081 @Override 082 public int hashCode() { 083 return Objects.hash( 084 id, 085 type, 086 origin, 087 name, 088 accessState, 089 createdBy, 090 createdAt, 091 modifiedBy, 092 modifiedAt, 093 iconReference, 094 allowedEntities, 095 ask, 096 textGen, 097 extract); 098 } 099 100 @Override 101 public String toString() { 102 return "AiSingleAgentResponseFull{" 103 + "id='" 104 + id 105 + '\'' 106 + ", " 107 + "type='" 108 + type 109 + '\'' 110 + ", " 111 + "origin='" 112 + origin 113 + '\'' 114 + ", " 115 + "name='" 116 + name 117 + '\'' 118 + ", " 119 + "accessState='" 120 + accessState 121 + '\'' 122 + ", " 123 + "createdBy='" 124 + createdBy 125 + '\'' 126 + ", " 127 + "createdAt='" 128 + createdAt 129 + '\'' 130 + ", " 131 + "modifiedBy='" 132 + modifiedBy 133 + '\'' 134 + ", " 135 + "modifiedAt='" 136 + modifiedAt 137 + '\'' 138 + ", " 139 + "iconReference='" 140 + iconReference 141 + '\'' 142 + ", " 143 + "allowedEntities='" 144 + allowedEntities 145 + '\'' 146 + ", " 147 + "ask='" 148 + ask 149 + '\'' 150 + ", " 151 + "textGen='" 152 + textGen 153 + '\'' 154 + ", " 155 + "extract='" 156 + extract 157 + '\'' 158 + "}"; 159 } 160 161 public static class Builder extends AiSingleAgentResponse.Builder { 162 163 protected AiStudioAgentAskResponse ask; 164 165 protected AiStudioAgentTextGenResponse textGen; 166 167 protected AiStudioAgentExtractResponse extract; 168 169 public Builder(String id, String origin, String name, String accessState) { 170 super(id, origin, name, accessState); 171 } 172 173 public Builder ask(AiStudioAgentAskResponse ask) { 174 this.ask = ask; 175 return this; 176 } 177 178 public Builder textGen(AiStudioAgentTextGenResponse textGen) { 179 this.textGen = textGen; 180 return this; 181 } 182 183 public Builder extract(AiStudioAgentExtractResponse extract) { 184 this.extract = extract; 185 return this; 186 } 187 188 @Override 189 public Builder type(AiSingleAgentResponseTypeField type) { 190 this.type = new EnumWrapper<AiSingleAgentResponseTypeField>(type); 191 return this; 192 } 193 194 @Override 195 public Builder type(EnumWrapper<AiSingleAgentResponseTypeField> type) { 196 this.type = type; 197 return this; 198 } 199 200 @Override 201 public Builder createdBy(UserBase createdBy) { 202 this.createdBy = createdBy; 203 return this; 204 } 205 206 @Override 207 public Builder createdAt(OffsetDateTime createdAt) { 208 this.createdAt = createdAt; 209 return this; 210 } 211 212 @Override 213 public Builder modifiedBy(UserBase modifiedBy) { 214 this.modifiedBy = modifiedBy; 215 return this; 216 } 217 218 @Override 219 public Builder modifiedAt(OffsetDateTime modifiedAt) { 220 this.modifiedAt = modifiedAt; 221 return this; 222 } 223 224 @Override 225 public Builder iconReference(String iconReference) { 226 this.iconReference = iconReference; 227 return this; 228 } 229 230 @Override 231 public Builder allowedEntities(List<AiAgentAllowedEntity> allowedEntities) { 232 this.allowedEntities = allowedEntities; 233 return this; 234 } 235 236 public AiSingleAgentResponseFull build() { 237 return new AiSingleAgentResponseFull(this); 238 } 239 } 240}