001package com.box.sdkgen.schemas.aistudioagentlongtexttool;
002
003import com.box.sdkgen.schemas.aiagentlongtexttool.AiAgentLongTextTool;
004import com.box.sdkgen.schemas.aiagentlongtexttool.AiAgentLongTextToolEmbeddingsField;
005import com.box.sdkgen.schemas.aillmendpointparams.AiLlmEndpointParams;
006import com.box.sdkgen.schemas.aillmendpointparamsaws.AiLlmEndpointParamsAws;
007import com.box.sdkgen.schemas.aillmendpointparamsgoogle.AiLlmEndpointParamsGoogle;
008import com.box.sdkgen.schemas.aillmendpointparamsibm.AiLlmEndpointParamsIbm;
009import com.box.sdkgen.schemas.aillmendpointparamsopenai.AiLlmEndpointParamsOpenAi;
010import com.fasterxml.jackson.annotation.JsonFilter;
011import com.fasterxml.jackson.annotation.JsonProperty;
012import java.util.Objects;
013
014/** AI agent processor used to to handle longer text. */
015@JsonFilter("nullablePropertyFilter")
016public class AiStudioAgentLongTextTool extends AiAgentLongTextTool {
017
018  /** True if system message contains custom instructions placeholder, false otherwise. */
019  @JsonProperty("is_custom_instructions_included")
020  protected Boolean isCustomInstructionsIncluded;
021
022  public AiStudioAgentLongTextTool() {
023    super();
024  }
025
026  protected AiStudioAgentLongTextTool(Builder builder) {
027    super(builder);
028    this.isCustomInstructionsIncluded = builder.isCustomInstructionsIncluded;
029    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
030  }
031
032  public Boolean getIsCustomInstructionsIncluded() {
033    return isCustomInstructionsIncluded;
034  }
035
036  @Override
037  public boolean equals(Object o) {
038    if (this == o) {
039      return true;
040    }
041    if (o == null || getClass() != o.getClass()) {
042      return false;
043    }
044    AiStudioAgentLongTextTool casted = (AiStudioAgentLongTextTool) o;
045    return Objects.equals(model, casted.model)
046        && Objects.equals(numTokensForCompletion, casted.numTokensForCompletion)
047        && Objects.equals(llmEndpointParams, casted.llmEndpointParams)
048        && Objects.equals(systemMessage, casted.systemMessage)
049        && Objects.equals(promptTemplate, casted.promptTemplate)
050        && Objects.equals(embeddings, casted.embeddings)
051        && Objects.equals(isCustomInstructionsIncluded, casted.isCustomInstructionsIncluded);
052  }
053
054  @Override
055  public int hashCode() {
056    return Objects.hash(
057        model,
058        numTokensForCompletion,
059        llmEndpointParams,
060        systemMessage,
061        promptTemplate,
062        embeddings,
063        isCustomInstructionsIncluded);
064  }
065
066  @Override
067  public String toString() {
068    return "AiStudioAgentLongTextTool{"
069        + "model='"
070        + model
071        + '\''
072        + ", "
073        + "numTokensForCompletion='"
074        + numTokensForCompletion
075        + '\''
076        + ", "
077        + "llmEndpointParams='"
078        + llmEndpointParams
079        + '\''
080        + ", "
081        + "systemMessage='"
082        + systemMessage
083        + '\''
084        + ", "
085        + "promptTemplate='"
086        + promptTemplate
087        + '\''
088        + ", "
089        + "embeddings='"
090        + embeddings
091        + '\''
092        + ", "
093        + "isCustomInstructionsIncluded='"
094        + isCustomInstructionsIncluded
095        + '\''
096        + "}";
097  }
098
099  public static class Builder extends AiAgentLongTextTool.Builder {
100
101    protected Boolean isCustomInstructionsIncluded;
102
103    public Builder isCustomInstructionsIncluded(Boolean isCustomInstructionsIncluded) {
104      this.isCustomInstructionsIncluded = isCustomInstructionsIncluded;
105      return this;
106    }
107
108    @Override
109    public Builder model(String model) {
110      this.model = model;
111      return this;
112    }
113
114    @Override
115    public Builder numTokensForCompletion(Long numTokensForCompletion) {
116      this.numTokensForCompletion = numTokensForCompletion;
117      return this;
118    }
119
120    @Override
121    public Builder llmEndpointParams(AiLlmEndpointParamsOpenAi llmEndpointParams) {
122      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
123      return this;
124    }
125
126    @Override
127    public Builder llmEndpointParams(AiLlmEndpointParamsGoogle llmEndpointParams) {
128      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
129      return this;
130    }
131
132    @Override
133    public Builder llmEndpointParams(AiLlmEndpointParamsAws llmEndpointParams) {
134      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
135      return this;
136    }
137
138    @Override
139    public Builder llmEndpointParams(AiLlmEndpointParamsIbm llmEndpointParams) {
140      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
141      return this;
142    }
143
144    @Override
145    public Builder llmEndpointParams(AiLlmEndpointParams llmEndpointParams) {
146      this.llmEndpointParams = llmEndpointParams;
147      return this;
148    }
149
150    @Override
151    public Builder systemMessage(String systemMessage) {
152      this.systemMessage = systemMessage;
153      return this;
154    }
155
156    @Override
157    public Builder promptTemplate(String promptTemplate) {
158      this.promptTemplate = promptTemplate;
159      return this;
160    }
161
162    @Override
163    public Builder embeddings(AiAgentLongTextToolEmbeddingsField embeddings) {
164      this.embeddings = embeddings;
165      return this;
166    }
167
168    public AiStudioAgentLongTextTool build() {
169      return new AiStudioAgentLongTextTool(this);
170    }
171  }
172}