Skip to content

Commit 2b9a964

Browse files
feat(specs): add CT Query predicate property (#4654) (generated) [skip ci]
Co-authored-by: Morgan Leroi <[email protected]>
1 parent c3addb4 commit 2b9a964

File tree

46 files changed

+480
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+480
-51
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/SourceCommercetools.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ public SourceCommercetools(string url, string projectKey)
6464
[JsonPropertyName("fallbackIsInStockValue")]
6565
public bool? FallbackIsInStockValue { get; set; }
6666

67+
/// <summary>
68+
/// Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
69+
/// </summary>
70+
/// <value>Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query). </value>
71+
[JsonPropertyName("productQueryPredicate")]
72+
public string ProductQueryPredicate { get; set; }
73+
6774
/// <summary>
6875
/// Gets or Sets CustomFields
6976
/// </summary>
@@ -83,6 +90,7 @@ public override string ToString()
8390
sb.Append(" Url: ").Append(Url).Append("\n");
8491
sb.Append(" ProjectKey: ").Append(ProjectKey).Append("\n");
8592
sb.Append(" FallbackIsInStockValue: ").Append(FallbackIsInStockValue).Append("\n");
93+
sb.Append(" ProductQueryPredicate: ").Append(ProductQueryPredicate).Append("\n");
8694
sb.Append(" CustomFields: ").Append(CustomFields).Append("\n");
8795
sb.Append("}\n");
8896
return sb.ToString();
@@ -115,6 +123,7 @@ public override bool Equals(object obj)
115123
(Url == input.Url || (Url != null && Url.Equals(input.Url))) &&
116124
(ProjectKey == input.ProjectKey || (ProjectKey != null && ProjectKey.Equals(input.ProjectKey))) &&
117125
(FallbackIsInStockValue == input.FallbackIsInStockValue || FallbackIsInStockValue.Equals(input.FallbackIsInStockValue)) &&
126+
(ProductQueryPredicate == input.ProductQueryPredicate || (ProductQueryPredicate != null && ProductQueryPredicate.Equals(input.ProductQueryPredicate))) &&
118127
(CustomFields == input.CustomFields || (CustomFields != null && CustomFields.Equals(input.CustomFields)));
119128
}
120129

@@ -144,6 +153,10 @@ public override int GetHashCode()
144153
hashCode = (hashCode * 59) + ProjectKey.GetHashCode();
145154
}
146155
hashCode = (hashCode * 59) + FallbackIsInStockValue.GetHashCode();
156+
if (ProductQueryPredicate != null)
157+
{
158+
hashCode = (hashCode * 59) + ProductQueryPredicate.GetHashCode();
159+
}
147160
if (CustomFields != null)
148161
{
149162
hashCode = (hashCode * 59) + CustomFields.GetHashCode();

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/SourceUpdateCommercetools.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ public SourceUpdateCommercetools()
4949
[JsonPropertyName("fallbackIsInStockValue")]
5050
public bool? FallbackIsInStockValue { get; set; }
5151

52+
/// <summary>
53+
/// Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
54+
/// </summary>
55+
/// <value>Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query). </value>
56+
[JsonPropertyName("productQueryPredicate")]
57+
public string ProductQueryPredicate { get; set; }
58+
5259
/// <summary>
5360
/// Gets or Sets CustomFields
5461
/// </summary>
@@ -67,6 +74,7 @@ public override string ToString()
6774
sb.Append(" Locales: ").Append(Locales).Append("\n");
6875
sb.Append(" Url: ").Append(Url).Append("\n");
6976
sb.Append(" FallbackIsInStockValue: ").Append(FallbackIsInStockValue).Append("\n");
77+
sb.Append(" ProductQueryPredicate: ").Append(ProductQueryPredicate).Append("\n");
7078
sb.Append(" CustomFields: ").Append(CustomFields).Append("\n");
7179
sb.Append("}\n");
7280
return sb.ToString();
@@ -98,6 +106,7 @@ public override bool Equals(object obj)
98106
(Locales == input.Locales || Locales != null && input.Locales != null && Locales.SequenceEqual(input.Locales)) &&
99107
(Url == input.Url || (Url != null && Url.Equals(input.Url))) &&
100108
(FallbackIsInStockValue == input.FallbackIsInStockValue || FallbackIsInStockValue.Equals(input.FallbackIsInStockValue)) &&
109+
(ProductQueryPredicate == input.ProductQueryPredicate || (ProductQueryPredicate != null && ProductQueryPredicate.Equals(input.ProductQueryPredicate))) &&
101110
(CustomFields == input.CustomFields || (CustomFields != null && CustomFields.Equals(input.CustomFields)));
102111
}
103112

@@ -123,6 +132,10 @@ public override int GetHashCode()
123132
hashCode = (hashCode * 59) + Url.GetHashCode();
124133
}
125134
hashCode = (hashCode * 59) + FallbackIsInStockValue.GetHashCode();
135+
if (ProductQueryPredicate != null)
136+
{
137+
hashCode = (hashCode * 59) + ProductQueryPredicate.GetHashCode();
138+
}
126139
if (CustomFields != null)
127140
{
128141
hashCode = (hashCode * 59) + CustomFields.GetHashCode();

clients/algoliasearch-client-go/algolia/ingestion/model_source_commercetools.go

Lines changed: 47 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/ingestion/model_source_update_commercetools.go

Lines changed: 47 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-java/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();

clients/algoliasearch-client-java/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();

clients/algoliasearch-client-javascript/packages/ingestion/model/sourceCommercetools.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@ export type SourceCommercetools = {
1919
*/
2020
fallbackIsInStockValue?: boolean;
2121

22+
/**
23+
* Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
24+
*/
25+
productQueryPredicate?: string;
26+
2227
customFields?: CommercetoolsCustomFields;
2328
};

clients/algoliasearch-client-javascript/packages/ingestion/model/sourceUpdateCommercetools.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@ export type SourceUpdateCommercetools = {
1717
*/
1818
fallbackIsInStockValue?: boolean;
1919

20+
/**
21+
* Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
22+
*/
23+
productQueryPredicate?: string;
24+
2025
customFields?: CommercetoolsCustomFields;
2126
};

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/SourceCommercetools.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import kotlinx.serialization.json.*
1212
* @param storeKeys
1313
* @param locales Locales for your commercetools stores.
1414
* @param fallbackIsInStockValue Whether a fallback value is stored in the Algolia record if there's no inventory information about the product.
15+
* @param productQueryPredicate Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
1516
* @param customFields
1617
*/
1718
@Serializable
@@ -29,5 +30,8 @@ public data class SourceCommercetools(
2930
/** Whether a fallback value is stored in the Algolia record if there's no inventory information about the product. */
3031
@SerialName(value = "fallbackIsInStockValue") val fallbackIsInStockValue: Boolean? = null,
3132

33+
/** Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query). */
34+
@SerialName(value = "productQueryPredicate") val productQueryPredicate: String? = null,
35+
3236
@SerialName(value = "customFields") val customFields: CommercetoolsCustomFields? = null,
3337
) : SourceInput

0 commit comments

Comments
 (0)