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

com.algolia.model.ingestion.DestinationIndexName Maven / Gradle / Ivy

The newest version!
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

package com.algolia.model.ingestion;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** DestinationIndexName */
@JsonDeserialize(as = DestinationIndexName.class)
public class DestinationIndexName implements DestinationInput {

  @JsonProperty("indexName")
  private String indexName;

  @JsonProperty("recordType")
  private RecordType recordType;

  @JsonProperty("attributesToExclude")
  private List attributesToExclude;

  public DestinationIndexName setIndexName(String indexName) {
    this.indexName = indexName;
    return this;
  }

  /** Algolia index name (case-sensitive). */
  @javax.annotation.Nonnull
  public String getIndexName() {
    return indexName;
  }

  public DestinationIndexName setRecordType(RecordType recordType) {
    this.recordType = recordType;
    return this;
  }

  /** Get recordType */
  @javax.annotation.Nullable
  public RecordType getRecordType() {
    return recordType;
  }

  public DestinationIndexName setAttributesToExclude(List attributesToExclude) {
    this.attributesToExclude = attributesToExclude;
    return this;
  }

  public DestinationIndexName addAttributesToExclude(String attributesToExcludeItem) {
    if (this.attributesToExclude == null) {
      this.attributesToExclude = new ArrayList<>();
    }
    this.attributesToExclude.add(attributesToExcludeItem);
    return this;
  }

  /**
   * Attributes from your source to exclude from Algolia records. Not all your data attributes will
   * be useful for searching. Keeping your Algolia records small increases indexing and search
   * performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the
   * `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from
   * arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only
   * excludes the `bar` attribute from the first element of the `foo` array, but indexes the
   * complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes
   * `bar` from all elements of the `foo` array.
   */
  @javax.annotation.Nullable
  public List getAttributesToExclude() {
    return attributesToExclude;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DestinationIndexName destinationIndexName = (DestinationIndexName) o;
    return (
      Objects.equals(this.indexName, destinationIndexName.indexName) &&
      Objects.equals(this.recordType, destinationIndexName.recordType) &&
      Objects.equals(this.attributesToExclude, destinationIndexName.attributesToExclude)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(indexName, recordType, attributesToExclude);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DestinationIndexName {\n");
    sb.append("    indexName: ").append(toIndentedString(indexName)).append("\n");
    sb.append("    recordType: ").append(toIndentedString(recordType)).append("\n");
    sb.append("    attributesToExclude: ").append(toIndentedString(attributesToExclude)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy