Skip to content

Commit 7af8de1

Browse files
feat(specs): add CT Query predicate property (generated)
algolia/api-clients-automation#4654 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Morgan Leroi <[email protected]>
1 parent b5861f1 commit 7af8de1

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public class SourceCommercetools implements SourceInput {
2828
@JsonProperty("fallbackIsInStockValue")
2929
private Boolean fallbackIsInStockValue;
3030

31+
@JsonProperty("productQueryPredicate")
32+
private String productQueryPredicate;
33+
3134
@JsonProperty("customFields")
3235
private CommercetoolsCustomFields customFields;
3336

@@ -105,6 +108,20 @@ public Boolean getFallbackIsInStockValue() {
105108
return fallbackIsInStockValue;
106109
}
107110

111+
public SourceCommercetools setProductQueryPredicate(String productQueryPredicate) {
112+
this.productQueryPredicate = productQueryPredicate;
113+
return this;
114+
}
115+
116+
/**
117+
* Predicate to filter out specific products when indexing. For more information, see [Query
118+
* Predicate](https://docs.commercetools.com/api/predicates/query).
119+
*/
120+
@javax.annotation.Nullable
121+
public String getProductQueryPredicate() {
122+
return productQueryPredicate;
123+
}
124+
108125
public SourceCommercetools setCustomFields(CommercetoolsCustomFields customFields) {
109126
this.customFields = customFields;
110127
return this;
@@ -131,13 +148,14 @@ public boolean equals(Object o) {
131148
Objects.equals(this.url, sourceCommercetools.url) &&
132149
Objects.equals(this.projectKey, sourceCommercetools.projectKey) &&
133150
Objects.equals(this.fallbackIsInStockValue, sourceCommercetools.fallbackIsInStockValue) &&
151+
Objects.equals(this.productQueryPredicate, sourceCommercetools.productQueryPredicate) &&
134152
Objects.equals(this.customFields, sourceCommercetools.customFields)
135153
);
136154
}
137155

138156
@Override
139157
public int hashCode() {
140-
return Objects.hash(storeKeys, locales, url, projectKey, fallbackIsInStockValue, customFields);
158+
return Objects.hash(storeKeys, locales, url, projectKey, fallbackIsInStockValue, productQueryPredicate, customFields);
141159
}
142160

143161
@Override
@@ -149,6 +167,7 @@ public String toString() {
149167
sb.append(" url: ").append(toIndentedString(url)).append("\n");
150168
sb.append(" projectKey: ").append(toIndentedString(projectKey)).append("\n");
151169
sb.append(" fallbackIsInStockValue: ").append(toIndentedString(fallbackIsInStockValue)).append("\n");
170+
sb.append(" productQueryPredicate: ").append(toIndentedString(productQueryPredicate)).append("\n");
152171
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
153172
sb.append("}");
154173
return sb.toString();

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public class SourceUpdateCommercetools implements SourceUpdateInput {
2525
@JsonProperty("fallbackIsInStockValue")
2626
private Boolean fallbackIsInStockValue;
2727

28+
@JsonProperty("productQueryPredicate")
29+
private String productQueryPredicate;
30+
2831
@JsonProperty("customFields")
2932
private CommercetoolsCustomFields customFields;
3033

@@ -91,6 +94,20 @@ public Boolean getFallbackIsInStockValue() {
9194
return fallbackIsInStockValue;
9295
}
9396

97+
public SourceUpdateCommercetools setProductQueryPredicate(String productQueryPredicate) {
98+
this.productQueryPredicate = productQueryPredicate;
99+
return this;
100+
}
101+
102+
/**
103+
* Predicate to filter out specific products when indexing. For more information, see [Query
104+
* Predicate](https://docs.commercetools.com/api/predicates/query).
105+
*/
106+
@javax.annotation.Nullable
107+
public String getProductQueryPredicate() {
108+
return productQueryPredicate;
109+
}
110+
94111
public SourceUpdateCommercetools setCustomFields(CommercetoolsCustomFields customFields) {
95112
this.customFields = customFields;
96113
return this;
@@ -116,13 +133,14 @@ public boolean equals(Object o) {
116133
Objects.equals(this.locales, sourceUpdateCommercetools.locales) &&
117134
Objects.equals(this.url, sourceUpdateCommercetools.url) &&
118135
Objects.equals(this.fallbackIsInStockValue, sourceUpdateCommercetools.fallbackIsInStockValue) &&
136+
Objects.equals(this.productQueryPredicate, sourceUpdateCommercetools.productQueryPredicate) &&
119137
Objects.equals(this.customFields, sourceUpdateCommercetools.customFields)
120138
);
121139
}
122140

123141
@Override
124142
public int hashCode() {
125-
return Objects.hash(storeKeys, locales, url, fallbackIsInStockValue, customFields);
143+
return Objects.hash(storeKeys, locales, url, fallbackIsInStockValue, productQueryPredicate, customFields);
126144
}
127145

128146
@Override
@@ -133,6 +151,7 @@ public String toString() {
133151
sb.append(" locales: ").append(toIndentedString(locales)).append("\n");
134152
sb.append(" url: ").append(toIndentedString(url)).append("\n");
135153
sb.append(" fallbackIsInStockValue: ").append(toIndentedString(fallbackIsInStockValue)).append("\n");
154+
sb.append(" productQueryPredicate: ").append(toIndentedString(productQueryPredicate)).append("\n");
136155
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
137156
sb.append("}");
138157
return sb.toString();

0 commit comments

Comments
 (0)