All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.amikos.chromadb.model.QueryEmbedding Maven / Gradle / Ivy

/*
 * FastAPI
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 0.1.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package tech.amikos.chromadb.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * QueryEmbedding
 */

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-08-13T09:37:37.268Z[Etc/UTC]")

public class QueryEmbedding {
  @SerializedName("where")
  private Map where = null;

  @SerializedName("where_document")
  private Map whereDocument = null;

  @SerializedName("query_embeddings")
  private List queryEmbeddings = new ArrayList();

  @SerializedName("n_results")
  private Integer nResults = 10;

  /**
   * Gets or Sets include
   */
  @JsonAdapter(IncludeEnum.Adapter.class)
  public enum IncludeEnum {
    @SerializedName("documents")
    DOCUMENTS("documents"),
    @SerializedName("embeddings")
    EMBEDDINGS("embeddings"),
    @SerializedName("metadatas")
    METADATAS("metadatas"),
    @SerializedName("distances")
    DISTANCES("distances");

    private String value;

    IncludeEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static IncludeEnum fromValue(String input) {
      for (IncludeEnum b : IncludeEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }
    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final IncludeEnum enumeration) throws IOException {
        jsonWriter.value(String.valueOf(enumeration.getValue()));
      }

      @Override
      public IncludeEnum read(final JsonReader jsonReader) throws IOException {
        Object value = jsonReader.nextString();
        return IncludeEnum.fromValue((String)(value));
      }
    }
  }  @SerializedName("include")
  private List include = null;

  public QueryEmbedding where(Map where) {
    this.where = where;
    return this;
  }

  public QueryEmbedding putWhereItem(String key, Object whereItem) {
    if (this.where == null) {
      this.where = new HashMap();
    }
    this.where.put(key, whereItem);
    return this;
  }

   /**
   * Get where
   * @return where
  **/
  @Schema(description = "")
  public Map getWhere() {
    return where;
  }

  public void setWhere(Map where) {
    this.where = where;
  }

  public QueryEmbedding whereDocument(Map whereDocument) {
    this.whereDocument = whereDocument;
    return this;
  }

  public QueryEmbedding putWhereDocumentItem(String key, Object whereDocumentItem) {
    if (this.whereDocument == null) {
      this.whereDocument = new HashMap();
    }
    this.whereDocument.put(key, whereDocumentItem);
    return this;
  }

   /**
   * Get whereDocument
   * @return whereDocument
  **/
  @Schema(description = "")
  public Map getWhereDocument() {
    return whereDocument;
  }

  public void setWhereDocument(Map whereDocument) {
    this.whereDocument = whereDocument;
  }

  public QueryEmbedding queryEmbeddings(List queryEmbeddings) {
    this.queryEmbeddings = queryEmbeddings;
    return this;
  }

  public QueryEmbedding addQueryEmbeddingsItem(Object queryEmbeddingsItem) {
    this.queryEmbeddings.add(queryEmbeddingsItem);
    return this;
  }

   /**
   * Get queryEmbeddings
   * @return queryEmbeddings
  **/
  @Schema(required = true, description = "")
  public List getQueryEmbeddings() {
    return queryEmbeddings;
  }

  public void setQueryEmbeddings(List queryEmbeddings) {
    this.queryEmbeddings = queryEmbeddings;
  }

  public QueryEmbedding nResults(Integer nResults) {
    this.nResults = nResults;
    return this;
  }

   /**
   * Get nResults
   * @return nResults
  **/
  @Schema(description = "")
  public Integer getNResults() {
    return nResults;
  }

  public void setNResults(Integer nResults) {
    this.nResults = nResults;
  }

  public QueryEmbedding include(List include) {
    this.include = include;
    return this;
  }

  public QueryEmbedding addIncludeItem(IncludeEnum includeItem) {
    if (this.include == null) {
      this.include = new ArrayList();
    }
    this.include.add(includeItem);
    return this;
  }

   /**
   * Get include
   * @return include
  **/
  @Schema(description = "")
  public List getInclude() {
    return include;
  }

  public void setInclude(List include) {
    this.include = include;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    QueryEmbedding queryEmbedding = (QueryEmbedding) o;
    return Objects.equals(this.where, queryEmbedding.where) &&
        Objects.equals(this.whereDocument, queryEmbedding.whereDocument) &&
        Objects.equals(this.queryEmbeddings, queryEmbedding.queryEmbeddings) &&
        Objects.equals(this.nResults, queryEmbedding.nResults) &&
        Objects.equals(this.include, queryEmbedding.include);
  }

  @Override
  public int hashCode() {
    return Objects.hash(where, whereDocument, queryEmbeddings, nResults, include);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class QueryEmbedding {\n");
    
    sb.append("    where: ").append(toIndentedString(where)).append("\n");
    sb.append("    whereDocument: ").append(toIndentedString(whereDocument)).append("\n");
    sb.append("    queryEmbeddings: ").append(toIndentedString(queryEmbeddings)).append("\n");
    sb.append("    nResults: ").append(toIndentedString(nResults)).append("\n");
    sb.append("    include: ").append(toIndentedString(include)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}