Skip to content

Commit 51a6520

Browse files
algolia-botrenovate[bot]shortcutsmillotp
committed
chore(deps): dependencies 2025-04-28 (generated)
algolia/api-clients-automation#4785 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Algolia Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: shortcuts <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 60b9140 commit 51a6520

File tree

5 files changed

+104
-147
lines changed

5 files changed

+104
-147
lines changed

algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationIndexName.java

Lines changed: 0 additions & 116 deletions
This file was deleted.

algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java

Lines changed: 101 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,113 @@
33

44
package com.algolia.model.ingestion;
55

6-
import com.algolia.exceptions.AlgoliaRuntimeException;
76
import com.fasterxml.jackson.annotation.*;
8-
import com.fasterxml.jackson.core.*;
9-
import com.fasterxml.jackson.databind.*;
107
import com.fasterxml.jackson.databind.annotation.*;
11-
import java.io.IOException;
12-
import java.util.logging.Logger;
8+
import java.util.ArrayList;
9+
import java.util.List;
10+
import java.util.Objects;
1311

1412
/** DestinationInput */
15-
@JsonDeserialize(using = DestinationInput.Deserializer.class)
16-
public interface DestinationInput {
17-
class Deserializer extends JsonDeserializer<DestinationInput> {
18-
19-
private static final Logger LOGGER = Logger.getLogger(Deserializer.class.getName());
20-
21-
@Override
22-
public DestinationInput deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
23-
JsonNode tree = jp.readValueAsTree();
24-
// deserialize DestinationIndexName
25-
if (tree.isObject()) {
26-
try (JsonParser parser = tree.traverse(jp.getCodec())) {
27-
return parser.readValueAs(DestinationIndexName.class);
28-
} catch (Exception e) {
29-
// deserialization failed, continue
30-
LOGGER.finest("Failed to deserialize oneOf DestinationIndexName (error: " + e.getMessage() + ") (type: DestinationIndexName)");
31-
}
32-
}
33-
throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree));
13+
public class DestinationInput {
14+
15+
@JsonProperty("indexName")
16+
private String indexName;
17+
18+
@JsonProperty("recordType")
19+
private RecordType recordType;
20+
21+
@JsonProperty("attributesToExclude")
22+
private List<String> attributesToExclude;
23+
24+
public DestinationInput setIndexName(String indexName) {
25+
this.indexName = indexName;
26+
return this;
27+
}
28+
29+
/** Algolia index name (case-sensitive). */
30+
@javax.annotation.Nonnull
31+
public String getIndexName() {
32+
return indexName;
33+
}
34+
35+
public DestinationInput setRecordType(RecordType recordType) {
36+
this.recordType = recordType;
37+
return this;
38+
}
39+
40+
/** Get recordType */
41+
@javax.annotation.Nullable
42+
public RecordType getRecordType() {
43+
return recordType;
44+
}
45+
46+
public DestinationInput setAttributesToExclude(List<String> attributesToExclude) {
47+
this.attributesToExclude = attributesToExclude;
48+
return this;
49+
}
50+
51+
public DestinationInput addAttributesToExclude(String attributesToExcludeItem) {
52+
if (this.attributesToExclude == null) {
53+
this.attributesToExclude = new ArrayList<>();
54+
}
55+
this.attributesToExclude.add(attributesToExcludeItem);
56+
return this;
57+
}
58+
59+
/**
60+
* Attributes from your source to exclude from Algolia records. Not all your data attributes will
61+
* be useful for searching. Keeping your Algolia records small increases indexing and search
62+
* performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the
63+
* `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from
64+
* arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only
65+
* excludes the `bar` attribute from the first element of the `foo` array, but indexes the
66+
* complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes
67+
* `bar` from all elements of the `foo` array.
68+
*/
69+
@javax.annotation.Nullable
70+
public List<String> getAttributesToExclude() {
71+
return attributesToExclude;
72+
}
73+
74+
@Override
75+
public boolean equals(Object o) {
76+
if (this == o) {
77+
return true;
3478
}
79+
if (o == null || getClass() != o.getClass()) {
80+
return false;
81+
}
82+
DestinationInput destinationInput = (DestinationInput) o;
83+
return (
84+
Objects.equals(this.indexName, destinationInput.indexName) &&
85+
Objects.equals(this.recordType, destinationInput.recordType) &&
86+
Objects.equals(this.attributesToExclude, destinationInput.attributesToExclude)
87+
);
88+
}
89+
90+
@Override
91+
public int hashCode() {
92+
return Objects.hash(indexName, recordType, attributesToExclude);
93+
}
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class DestinationInput {\n");
99+
sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n");
100+
sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n");
101+
sb.append(" attributesToExclude: ").append(toIndentedString(attributesToExclude)).append("\n");
102+
sb.append("}");
103+
return sb.toString();
104+
}
35105

36-
/** Handle deserialization of the 'null' value. */
37-
@Override
38-
public DestinationInput getNullValue(DeserializationContext ctxt) throws JsonMappingException {
39-
throw new JsonMappingException(ctxt.getParser(), "DestinationInput cannot be null");
106+
/**
107+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
108+
*/
109+
private String toIndentedString(Object o) {
110+
if (o == null) {
111+
return "null";
40112
}
113+
return o.toString().replace("\n", "\n ");
41114
}
42115
}

gradle/wrapper/gradle-wrapper.jar

59 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

0 commit comments

Comments
 (0)