001package com.box.sdkgen.schemas.aiagentspreadsheettool;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
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/** The AI agent tool used to handle spreadsheets and tabular data. */
015@JsonFilter("nullablePropertyFilter")
016public class AiAgentSpreadsheetTool extends SerializableObject {
017
018  /**
019   * The model used for the AI agent for spreadsheets. For specific model values, see the [available
020   * models list](https://developer.box.com/guides/box-ai/ai-models).
021   */
022  protected String model;
023
024  /** The number of tokens for completion. */
025  @JsonProperty("num_tokens_for_completion")
026  protected Long numTokensForCompletion;
027
028  @JsonProperty("llm_endpoint_params")
029  protected AiLlmEndpointParams llmEndpointParams;
030
031  public AiAgentSpreadsheetTool() {
032    super();
033  }
034
035  protected AiAgentSpreadsheetTool(Builder builder) {
036    super();
037    this.model = builder.model;
038    this.numTokensForCompletion = builder.numTokensForCompletion;
039    this.llmEndpointParams = builder.llmEndpointParams;
040    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
041  }
042
043  public String getModel() {
044    return model;
045  }
046
047  public Long getNumTokensForCompletion() {
048    return numTokensForCompletion;
049  }
050
051  public AiLlmEndpointParams getLlmEndpointParams() {
052    return llmEndpointParams;
053  }
054
055  @Override
056  public boolean equals(Object o) {
057    if (this == o) {
058      return true;
059    }
060    if (o == null || getClass() != o.getClass()) {
061      return false;
062    }
063    AiAgentSpreadsheetTool casted = (AiAgentSpreadsheetTool) o;
064    return Objects.equals(model, casted.model)
065        && Objects.equals(numTokensForCompletion, casted.numTokensForCompletion)
066        && Objects.equals(llmEndpointParams, casted.llmEndpointParams);
067  }
068
069  @Override
070  public int hashCode() {
071    return Objects.hash(model, numTokensForCompletion, llmEndpointParams);
072  }
073
074  @Override
075  public String toString() {
076    return "AiAgentSpreadsheetTool{"
077        + "model='"
078        + model
079        + '\''
080        + ", "
081        + "numTokensForCompletion='"
082        + numTokensForCompletion
083        + '\''
084        + ", "
085        + "llmEndpointParams='"
086        + llmEndpointParams
087        + '\''
088        + "}";
089  }
090
091  public static class Builder extends NullableFieldTracker {
092
093    protected String model;
094
095    protected Long numTokensForCompletion;
096
097    protected AiLlmEndpointParams llmEndpointParams;
098
099    public Builder model(String model) {
100      this.model = model;
101      return this;
102    }
103
104    public Builder numTokensForCompletion(Long numTokensForCompletion) {
105      this.numTokensForCompletion = numTokensForCompletion;
106      return this;
107    }
108
109    public Builder llmEndpointParams(AiLlmEndpointParamsOpenAi llmEndpointParams) {
110      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
111      return this;
112    }
113
114    public Builder llmEndpointParams(AiLlmEndpointParamsGoogle llmEndpointParams) {
115      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
116      return this;
117    }
118
119    public Builder llmEndpointParams(AiLlmEndpointParamsAws llmEndpointParams) {
120      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
121      return this;
122    }
123
124    public Builder llmEndpointParams(AiLlmEndpointParamsIbm llmEndpointParams) {
125      this.llmEndpointParams = new AiLlmEndpointParams(llmEndpointParams);
126      return this;
127    }
128
129    public Builder llmEndpointParams(AiLlmEndpointParams llmEndpointParams) {
130      this.llmEndpointParams = llmEndpointParams;
131      return this;
132    }
133
134    public AiAgentSpreadsheetTool build() {
135      return new AiAgentSpreadsheetTool(this);
136    }
137  }
138}