001package com.box.sdkgen.schemas.aiagenttextgen; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.schemas.aiagentbasicgentool.AiAgentBasicGenTool; 006import com.box.sdkgen.serialization.json.EnumWrapper; 007import com.fasterxml.jackson.annotation.JsonFilter; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 010import com.fasterxml.jackson.databind.annotation.JsonSerialize; 011import java.util.Objects; 012 013/** The AI agent used for generating text. */ 014@JsonFilter("nullablePropertyFilter") 015public class AiAgentTextGen extends SerializableObject { 016 017 /** The type of AI agent used for generating text. */ 018 @JsonDeserialize(using = AiAgentTextGenTypeField.AiAgentTextGenTypeFieldDeserializer.class) 019 @JsonSerialize(using = AiAgentTextGenTypeField.AiAgentTextGenTypeFieldSerializer.class) 020 protected EnumWrapper<AiAgentTextGenTypeField> type; 021 022 @JsonProperty("basic_gen") 023 protected AiAgentBasicGenTool basicGen; 024 025 public AiAgentTextGen() { 026 super(); 027 this.type = new EnumWrapper<AiAgentTextGenTypeField>(AiAgentTextGenTypeField.AI_AGENT_TEXT_GEN); 028 } 029 030 protected AiAgentTextGen(Builder builder) { 031 super(); 032 this.type = builder.type; 033 this.basicGen = builder.basicGen; 034 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 035 } 036 037 public EnumWrapper<AiAgentTextGenTypeField> getType() { 038 return type; 039 } 040 041 public AiAgentBasicGenTool getBasicGen() { 042 return basicGen; 043 } 044 045 @Override 046 public boolean equals(Object o) { 047 if (this == o) { 048 return true; 049 } 050 if (o == null || getClass() != o.getClass()) { 051 return false; 052 } 053 AiAgentTextGen casted = (AiAgentTextGen) o; 054 return Objects.equals(type, casted.type) && Objects.equals(basicGen, casted.basicGen); 055 } 056 057 @Override 058 public int hashCode() { 059 return Objects.hash(type, basicGen); 060 } 061 062 @Override 063 public String toString() { 064 return "AiAgentTextGen{" + "type='" + type + '\'' + ", " + "basicGen='" + basicGen + '\'' + "}"; 065 } 066 067 public static class Builder extends NullableFieldTracker { 068 069 protected EnumWrapper<AiAgentTextGenTypeField> type; 070 071 protected AiAgentBasicGenTool basicGen; 072 073 public Builder() { 074 super(); 075 } 076 077 public Builder type(AiAgentTextGenTypeField type) { 078 this.type = new EnumWrapper<AiAgentTextGenTypeField>(type); 079 return this; 080 } 081 082 public Builder type(EnumWrapper<AiAgentTextGenTypeField> type) { 083 this.type = type; 084 return this; 085 } 086 087 public Builder basicGen(AiAgentBasicGenTool basicGen) { 088 this.basicGen = basicGen; 089 return this; 090 } 091 092 public AiAgentTextGen build() { 093 if (this.type == null) { 094 this.type = 095 new EnumWrapper<AiAgentTextGenTypeField>(AiAgentTextGenTypeField.AI_AGENT_TEXT_GEN); 096 } 097 return new AiAgentTextGen(this); 098 } 099 } 100}