001package com.box.sdkgen.schemas.aistudioagentbasicgentool;
002
003import com.box.sdkgen.schemas.aiagentbasicgentool.AiAgentBasicGenTool;
004import com.box.sdkgen.schemas.aiagentlongtexttooltextgen.AiAgentLongTextToolTextGenEmbeddingsField;
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 basic tool used to generate text. */
015@JsonFilter("nullablePropertyFilter")
016public class AiStudioAgentBasicGenTool extends AiAgentBasicGenTool {
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 AiStudioAgentBasicGenTool() {
023    super();
024  }
025
026  protected AiStudioAgentBasicGenTool(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    AiStudioAgentBasicGenTool casted = (AiStudioAgentBasicGenTool) 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(contentTemplate, casted.contentTemplate)
052        && Objects.equals(isCustomInstructionsIncluded, casted.isCustomInstructionsIncluded);
053  }
054
055  @Override
056  public int hashCode() {
057    return Objects.hash(
058        model,
059        numTokensForCompletion,
060        llmEndpointParams,
061        systemMessage,
062        promptTemplate,
063        embeddings,
064        contentTemplate,
065        isCustomInstructionsIncluded);
066  }
067
068  @Override
069  public String toString() {
070    return "AiStudioAgentBasicGenTool{"
071        + "model='"
072        + model
073        + '\''
074        + ", "
075        + "numTokensForCompletion='"
076        + numTokensForCompletion
077        + '\''
078        + ", "
079        + "llmEndpointParams='"
080        + llmEndpointParams
081        + '\''
082        + ", "
083        + "systemMessage='"
084        + systemMessage
085        + '\''
086        + ", "
087        + "promptTemplate='"
088        + promptTemplate
089        + '\''
090        + ", "
091        + "embeddings='"
092        + embeddings
093        + '\''
094        + ", "
095        + "contentTemplate='"
096        + contentTemplate
097        + '\''
098        + ", "
099        + "isCustomInstructionsIncluded='"
100        + isCustomInstructionsIncluded
101        + '\''
102        + "}";
103  }
104
105  public static class Builder extends AiAgentBasicGenTool.Builder {
106
107    protected Boolean isCustomInstructionsIncluded;
108
109    public Builder isCustomInstructionsIncluded(Boolean isCustomInstructionsIncluded) {
110      this.isCustomInstructionsIncluded = isCustomInstructionsIncluded;
111      return this;
112    }
113
114    @Override
115    public Builder model(String model) {
116      this.model = model;
117      return this;
118    }
119
120    @Override
121    public Builder numTokensForCompletion(Long numTokensForCompletion) {
122      this.numTokensForCompletion = numTokensForCompletion;
123      return this;
124    }
125
126    @Override
127    public Builder llmEndpointParams(AiLlmEndpointParamsOpenAi llmEndpointParams) {
128      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
129      return this;
130    }
131
132    @Override
133    public Builder llmEndpointParams(AiLlmEndpointParamsGoogle llmEndpointParams) {
134      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
135      return this;
136    }
137
138    @Override
139    public Builder llmEndpointParams(AiLlmEndpointParamsAws llmEndpointParams) {
140      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
141      return this;
142    }
143
144    @Override
145    public Builder llmEndpointParams(AiLlmEndpointParamsIbm llmEndpointParams) {
146      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
147      return this;
148    }
149
150    @Override
151    public Builder llmEndpointParams(AiLlmEndpointParams llmEndpointParams) {
152      this.llmEndpointParams = llmEndpointParams;
153      return this;
154    }
155
156    @Override
157    public Builder systemMessage(String systemMessage) {
158      this.systemMessage = systemMessage;
159      return this;
160    }
161
162    @Override
163    public Builder promptTemplate(String promptTemplate) {
164      this.promptTemplate = promptTemplate;
165      return this;
166    }
167
168    @Override
169    public Builder embeddings(AiAgentLongTextToolTextGenEmbeddingsField embeddings) {
170      this.embeddings = embeddings;
171      return this;
172    }
173
174    @Override
175    public Builder contentTemplate(String contentTemplate) {
176      this.contentTemplate = contentTemplate;
177      return this;
178    }
179
180    public AiStudioAgentBasicGenTool build() {
181      return new AiStudioAgentBasicGenTool(this);
182    }
183  }
184}