001package com.box.sdkgen.schemas.aistudioagentspreadsheettool;
002
003import com.box.sdkgen.schemas.aiagentspreadsheettool.AiAgentSpreadsheetTool;
004import com.box.sdkgen.schemas.aillmendpointparams.AiLlmEndpointParams;
005import com.box.sdkgen.schemas.aillmendpointparamsaws.AiLlmEndpointParamsAws;
006import com.box.sdkgen.schemas.aillmendpointparamsgoogle.AiLlmEndpointParamsGoogle;
007import com.box.sdkgen.schemas.aillmendpointparamsibm.AiLlmEndpointParamsIbm;
008import com.box.sdkgen.schemas.aillmendpointparamsopenai.AiLlmEndpointParamsOpenAi;
009import com.fasterxml.jackson.annotation.JsonFilter;
010import java.util.Objects;
011
012/** The AI agent tool used to handle spreadsheets and tabular data. */
013@JsonFilter("nullablePropertyFilter")
014public class AiStudioAgentSpreadsheetTool extends AiAgentSpreadsheetTool {
015
016  public AiStudioAgentSpreadsheetTool() {
017    super();
018  }
019
020  protected AiStudioAgentSpreadsheetTool(Builder builder) {
021    super(builder);
022    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
023  }
024
025  @Override
026  public boolean equals(Object o) {
027    if (this == o) {
028      return true;
029    }
030    if (o == null || getClass() != o.getClass()) {
031      return false;
032    }
033    AiStudioAgentSpreadsheetTool casted = (AiStudioAgentSpreadsheetTool) o;
034    return Objects.equals(model, casted.model)
035        && Objects.equals(numTokensForCompletion, casted.numTokensForCompletion)
036        && Objects.equals(llmEndpointParams, casted.llmEndpointParams);
037  }
038
039  @Override
040  public int hashCode() {
041    return Objects.hash(model, numTokensForCompletion, llmEndpointParams);
042  }
043
044  @Override
045  public String toString() {
046    return "AiStudioAgentSpreadsheetTool{"
047        + "model='"
048        + model
049        + '\''
050        + ", "
051        + "numTokensForCompletion='"
052        + numTokensForCompletion
053        + '\''
054        + ", "
055        + "llmEndpointParams='"
056        + llmEndpointParams
057        + '\''
058        + "}";
059  }
060
061  public static class Builder extends AiAgentSpreadsheetTool.Builder {
062
063    @Override
064    public Builder model(String model) {
065      this.model = model;
066      return this;
067    }
068
069    @Override
070    public Builder numTokensForCompletion(Long numTokensForCompletion) {
071      this.numTokensForCompletion = numTokensForCompletion;
072      return this;
073    }
074
075    @Override
076    public Builder llmEndpointParams(AiLlmEndpointParamsOpenAi llmEndpointParams) {
077      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
078      return this;
079    }
080
081    @Override
082    public Builder llmEndpointParams(AiLlmEndpointParamsGoogle llmEndpointParams) {
083      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
084      return this;
085    }
086
087    @Override
088    public Builder llmEndpointParams(AiLlmEndpointParamsAws llmEndpointParams) {
089      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
090      return this;
091    }
092
093    @Override
094    public Builder llmEndpointParams(AiLlmEndpointParamsIbm llmEndpointParams) {
095      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
096      return this;
097    }
098
099    @Override
100    public Builder llmEndpointParams(AiLlmEndpointParams llmEndpointParams) {
101      this.llmEndpointParams = llmEndpointParams;
102      return this;
103    }
104
105    public AiStudioAgentSpreadsheetTool build() {
106      return new AiStudioAgentSpreadsheetTool(this);
107    }
108  }
109}