Skip to content

feat: complete search client CTS APIC-240 #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** BaseIndexSettings */
Expand All @@ -26,7 +24,7 @@ public class BaseIndexSettings {
private List<String> camelCaseAttributes = null;

@SerializedName("decompoundedAttributes")
private Map<String, Object> decompoundedAttributes = null;
private Object decompoundedAttributes = new Object();

@SerializedName("indexLanguages")
private List<String> indexLanguages = null;
Expand All @@ -44,7 +42,7 @@ public class BaseIndexSettings {
private List<String> numericAttributesForFiltering = null;

@SerializedName("userData")
private Map<String, Object> userData = null;
private Object userData = new Object();

public BaseIndexSettings replicas(List<String> replicas) {
this.replicas = replicas;
Expand Down Expand Up @@ -190,37 +188,24 @@ public void setCamelCaseAttributes(List<String> camelCaseAttributes) {
}

public BaseIndexSettings decompoundedAttributes(
Map<String, Object> decompoundedAttributes
Object decompoundedAttributes
) {
this.decompoundedAttributes = decompoundedAttributes;
return this;
}

public BaseIndexSettings putDecompoundedAttributesItem(
String key,
Object decompoundedAttributesItem
) {
if (this.decompoundedAttributes == null) {
this.decompoundedAttributes = new HashMap<>();
}
this.decompoundedAttributes.put(key, decompoundedAttributesItem);
return this;
}

/**
* Specify on which attributes in your index Algolia should apply word segmentation, also known as
* decompounding.
*
* @return decompoundedAttributes
*/
@javax.annotation.Nullable
public Map<String, Object> getDecompoundedAttributes() {
public Object getDecompoundedAttributes() {
return decompoundedAttributes;
}

public void setDecompoundedAttributes(
Map<String, Object> decompoundedAttributes
) {
public void setDecompoundedAttributes(Object decompoundedAttributes) {
this.decompoundedAttributes = decompoundedAttributes;
}

Expand Down Expand Up @@ -361,30 +346,22 @@ public void setNumericAttributesForFiltering(
this.numericAttributesForFiltering = numericAttributesForFiltering;
}

public BaseIndexSettings userData(Map<String, Object> userData) {
public BaseIndexSettings userData(Object userData) {
this.userData = userData;
return this;
}

public BaseIndexSettings putUserDataItem(String key, Object userDataItem) {
if (this.userData == null) {
this.userData = new HashMap<>();
}
this.userData.put(key, userDataItem);
return this;
}

/**
* Lets you store custom data in your indices.
*
* @return userData
*/
@javax.annotation.Nullable
public Map<String, Object> getUserData() {
public Object getUserData() {
return userData;
}

public void setUserData(Map<String, Object> userData) {
public void setUserData(Object userData) {
this.userData = userData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class BaseSearchResponse {
private String serverUsed;

@SerializedName("userData")
private Map<String, Object> userData = null;
private Object userData = new Object();

public BaseSearchResponse abTestID(Integer abTestID) {
this.abTestID = abTestID;
Expand Down Expand Up @@ -551,30 +551,22 @@ public void setServerUsed(String serverUsed) {
this.serverUsed = serverUsed;
}

public BaseSearchResponse userData(Map<String, Object> userData) {
public BaseSearchResponse userData(Object userData) {
this.userData = userData;
return this;
}

public BaseSearchResponse putUserDataItem(String key, Object userDataItem) {
if (this.userData == null) {
this.userData = new HashMap<>();
}
this.userData.put(key, userDataItem);
return this;
}

/**
* Lets you store custom data in your indices.
*
* @return userData
*/
@javax.annotation.Nullable
public Map<String, Object> getUserData() {
public Object getUserData() {
return userData;
}

public void setUserData(Map<String, Object> userData) {
public void setUserData(Object userData) {
this.userData = userData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class BrowseResponse {
private String serverUsed;

@SerializedName("userData")
private Map<String, Object> userData = null;
private Object userData = new Object();

@SerializedName("hits")
private List<Record> hits = new ArrayList<>();
Expand Down Expand Up @@ -557,30 +557,22 @@ public void setServerUsed(String serverUsed) {
this.serverUsed = serverUsed;
}

public BrowseResponse userData(Map<String, Object> userData) {
public BrowseResponse userData(Object userData) {
this.userData = userData;
return this;
}

public BrowseResponse putUserDataItem(String key, Object userDataItem) {
if (this.userData == null) {
this.userData = new HashMap<>();
}
this.userData.put(key, userDataItem);
return this;
}

/**
* Lets you store custom data in your indices.
*
* @return userData
*/
@javax.annotation.Nullable
public Map<String, Object> getUserData() {
public Object getUserData() {
return userData;
}

public void setUserData(Map<String, Object> userData) {
public void setUserData(Object userData) {
this.userData = userData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** Consequence of the Rule. */
Expand All @@ -23,7 +21,7 @@ public class Consequence {
private List<ConsequenceHide> hide = null;

@SerializedName("userData")
private Map<String, Object> userData = null;
private Object userData;

public Consequence params(ConsequenceParams params) {
this.params = params;
Expand Down Expand Up @@ -120,31 +118,23 @@ public void setHide(List<ConsequenceHide> hide) {
this.hide = hide;
}

public Consequence userData(Map<String, Object> userData) {
public Consequence userData(Object userData) {
this.userData = userData;
return this;
}

public Consequence putUserDataItem(String key, Object userDataItem) {
if (this.userData == null) {
this.userData = new HashMap<>();
}
this.userData.put(key, userDataItem);
return this;
}

/**
* Custom JSON object that will be appended to the userData array in the response. This object
* isn't interpreted by the API. It's limited to 1kB of minified JSON.
*
* @return userData
*/
@javax.annotation.Nullable
public Map<String, Object> getUserData() {
public Object getUserData() {
return userData;
}

public void setUserData(Map<String, Object> userData) {
public void setUserData(Object userData) {
this.userData = userData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** GetObjectsResponse */
public class GetObjectsResponse {

@SerializedName("results")
private List<Map<String, Object>> results = null;
private List<Object> results = null;

public GetObjectsResponse results(List<Map<String, Object>> results) {
public GetObjectsResponse results(List<Object> results) {
this.results = results;
return this;
}

public GetObjectsResponse addResultsItem(Map<String, Object> resultsItem) {
public GetObjectsResponse addResultsItem(Object resultsItem) {
if (this.results == null) {
this.results = new ArrayList<>();
}
Expand All @@ -31,11 +30,11 @@ public GetObjectsResponse addResultsItem(Map<String, Object> resultsItem) {
* @return results
*/
@javax.annotation.Nullable
public List<Map<String, Object>> getResults() {
public List<Object> getResults() {
return results;
}

public void setResults(List<Map<String, Object>> results) {
public void setResults(List<Object> results) {
this.results = results;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** The Algolia index settings. */
Expand All @@ -31,7 +29,7 @@ public class IndexSettings {
private List<String> camelCaseAttributes = null;

@SerializedName("decompoundedAttributes")
private Map<String, Object> decompoundedAttributes = null;
private Object decompoundedAttributes = new Object();

@SerializedName("indexLanguages")
private List<String> indexLanguages = null;
Expand All @@ -49,7 +47,7 @@ public class IndexSettings {
private List<String> numericAttributesForFiltering = null;

@SerializedName("userData")
private Map<String, Object> userData = null;
private Object userData = new Object();

@SerializedName("searchableAttributes")
private List<String> searchableAttributes = null;
Expand Down Expand Up @@ -643,38 +641,23 @@ public void setCamelCaseAttributes(List<String> camelCaseAttributes) {
this.camelCaseAttributes = camelCaseAttributes;
}

public IndexSettings decompoundedAttributes(
Map<String, Object> decompoundedAttributes
) {
public IndexSettings decompoundedAttributes(Object decompoundedAttributes) {
this.decompoundedAttributes = decompoundedAttributes;
return this;
}

public IndexSettings putDecompoundedAttributesItem(
String key,
Object decompoundedAttributesItem
) {
if (this.decompoundedAttributes == null) {
this.decompoundedAttributes = new HashMap<>();
}
this.decompoundedAttributes.put(key, decompoundedAttributesItem);
return this;
}

/**
* Specify on which attributes in your index Algolia should apply word segmentation, also known as
* decompounding.
*
* @return decompoundedAttributes
*/
@javax.annotation.Nullable
public Map<String, Object> getDecompoundedAttributes() {
public Object getDecompoundedAttributes() {
return decompoundedAttributes;
}

public void setDecompoundedAttributes(
Map<String, Object> decompoundedAttributes
) {
public void setDecompoundedAttributes(Object decompoundedAttributes) {
this.decompoundedAttributes = decompoundedAttributes;
}

Expand Down Expand Up @@ -815,30 +798,22 @@ public void setNumericAttributesForFiltering(
this.numericAttributesForFiltering = numericAttributesForFiltering;
}

public IndexSettings userData(Map<String, Object> userData) {
public IndexSettings userData(Object userData) {
this.userData = userData;
return this;
}

public IndexSettings putUserDataItem(String key, Object userDataItem) {
if (this.userData == null) {
this.userData = new HashMap<>();
}
this.userData.put(key, userDataItem);
return this;
}

/**
* Lets you store custom data in your indices.
*
* @return userData
*/
@javax.annotation.Nullable
public Map<String, Object> getUserData() {
public Object getUserData() {
return userData;
}

public void setUserData(Map<String, Object> userData) {
public void setUserData(Object userData) {
this.userData = userData;
}

Expand Down
Loading