From a2d7c898e4b6ddbccc5bf2df86ab78340c3a6e53 Mon Sep 17 00:00:00 2001 From: KSGRelewise <119578211+KSGRelewise@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:11:41 +0200 Subject: [PATCH] Regenerated from version 1.170.0 --- Generator/Generator.csproj | 2 +- .../ContentCategoryDataRelevanceModifier.java | 10 +- .../model/ContentDataIntegerValueFacet.java | 1 + .../ContentDataIntegerValueFacetResult.java | 1 + .../model/ContentDataRelevanceModifier.java | 10 +- .../client/model/DataRelevanceModifier.java | 1 + .../java/com/relewise/client/model/Facet.java | 1 + .../relewise/client/model/FacetResult.java | 1 + .../relewise/client/model/FacetingField.java | 5 + .../com/relewise/client/model/Filter.java | 1 + .../client/model/ObjectValueCondition.java | 1 + .../model/ObjectValueIsSubsetOfCondition.java | 117 ++++++++++++ .../ProductCategoryDataRelevanceModifier.java | 10 +- .../ProductChangeTriggerResultSettings.java | 12 +- .../ProductDataIntegerValueFacetResult.java | 1 + .../model/ProductDataRelevanceModifier.java | 10 +- .../client/model/ProductInCartFilter.java | 66 +++++++ ...ctInterestTriggerResultResultSettings.java | 12 +- .../relewise/client/model/ProductQuery.java | 13 ++ ...roductQuerySelectedPropertiesSettings.java | 57 ++++++ .../client/model/ProductResultDetails.java | 3 + .../client/model/PurchaseQualifiers.java | 110 +++++++++++ .../model/PurchaseQualifiersIEquatable.java | 22 +++ .../client/model/RecentlyPurchasedFacet.java | 89 +++++++++ .../model/RecentlyPurchasedFacetResult.java | 89 +++++++++ ...ectedProductDetailsPropertiesSettings.java | 174 ++++++++++++++++++ ...ectedVariantDetailsPropertiesSettings.java | 128 +++++++++++++ ...DataValueSignificantDataValueComparer.java | 5 + .../VariantChangeTriggerResultSettings.java | 12 +- .../model/VariantDataRelevanceModifier.java | 10 +- 30 files changed, 945 insertions(+), 29 deletions(-) create mode 100644 src/src/main/java/com/relewise/client/model/ObjectValueIsSubsetOfCondition.java create mode 100644 src/src/main/java/com/relewise/client/model/ProductInCartFilter.java create mode 100644 src/src/main/java/com/relewise/client/model/ProductQuerySelectedPropertiesSettings.java create mode 100644 src/src/main/java/com/relewise/client/model/PurchaseQualifiers.java create mode 100644 src/src/main/java/com/relewise/client/model/PurchaseQualifiersIEquatable.java create mode 100644 src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacet.java create mode 100644 src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacetResult.java create mode 100644 src/src/main/java/com/relewise/client/model/SelectedProductDetailsPropertiesSettings.java create mode 100644 src/src/main/java/com/relewise/client/model/SelectedVariantDetailsPropertiesSettings.java diff --git a/Generator/Generator.csproj b/Generator/Generator.csproj index 036adff..75720a5 100644 --- a/Generator/Generator.csproj +++ b/Generator/Generator.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java index 3a392ab..425baf9 100644 --- a/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java @@ -42,7 +42,10 @@ public ContentCategoryDataRelevanceModifier(String key, ArrayListRelevanceModifier that can change the relevance of a ContentCategory depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public static ContentCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { @@ -51,7 +54,10 @@ public static ContentCategoryDataRelevanceModifier create(String key, ArrayList< /** * Creates a RelevanceModifier that can change the relevance of a ContentCategory depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public ContentCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { diff --git a/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacet.java b/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacet.java index 051e1ab..08548f6 100644 --- a/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacet.java +++ b/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacet.java @@ -17,6 +17,7 @@ import java.util.Set; import java.util.HashSet; +/** @deprecated Use ContentDataDoubleValueFacet instead */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, diff --git a/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacetResult.java b/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacetResult.java index 979b75d..130af86 100644 --- a/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacetResult.java +++ b/src/src/main/java/com/relewise/client/model/ContentDataIntegerValueFacetResult.java @@ -17,6 +17,7 @@ import java.util.Set; import java.util.HashSet; +/** @deprecated Use ContentDataDoubleValueFacetResult instead */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, diff --git a/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java index d083eaa..91f9cc5 100644 --- a/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java @@ -42,7 +42,10 @@ public ContentDataRelevanceModifier(String key, ArrayList condit /** * Creates a RelevanceModifier that can change the relevance of a Content depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public static ContentDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { @@ -51,7 +54,10 @@ public static ContentDataRelevanceModifier create(String key, ArrayListRelevanceModifier that can change the relevance of a Content depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public ContentDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { diff --git a/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java index f3e6f3f..3df56e6 100644 --- a/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java @@ -17,6 +17,7 @@ import java.util.Set; import java.util.HashSet; +/** a RelevanceModifier that can change the relevance of an entity depending on matching conditions on a certain key. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, diff --git a/src/src/main/java/com/relewise/client/model/Facet.java b/src/src/main/java/com/relewise/client/model/Facet.java index e4ebbbb..7656d22 100644 --- a/src/src/main/java/com/relewise/client/model/Facet.java +++ b/src/src/main/java/com/relewise/client/model/Facet.java @@ -57,6 +57,7 @@ @JsonSubTypes.Type(value = ProductCategoryDataObjectFacet.class, name = "Relewise.Client.DataTypes.Search.Facets.Queries.ProductCategoryDataObjectFacet, Relewise.Client"), @JsonSubTypes.Type(value = ContentDataObjectFacet.class, name = "Relewise.Client.DataTypes.Search.Facets.Queries.ContentDataObjectFacet, Relewise.Client"), @JsonSubTypes.Type(value = CategoryHierarchyFacet.class, name = "Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client"), + @JsonSubTypes.Type(value = RecentlyPurchasedFacet.class, name = "Relewise.Client.DataTypes.Search.Facets.Queries.RecentlyPurchasedFacet, Relewise.Client"), }) @JsonIgnoreProperties(ignoreUnknown = true) public abstract class Facet diff --git a/src/src/main/java/com/relewise/client/model/FacetResult.java b/src/src/main/java/com/relewise/client/model/FacetResult.java index 2e8188c..86378d4 100644 --- a/src/src/main/java/com/relewise/client/model/FacetResult.java +++ b/src/src/main/java/com/relewise/client/model/FacetResult.java @@ -55,6 +55,7 @@ @JsonSubTypes.Type(value = DataObjectDoubleRangesFacetResult.class, name = "Relewise.Client.DataTypes.Search.Facets.Result.DataObjectDoubleRangesFacetResult, Relewise.Client"), @JsonSubTypes.Type(value = DataObjectFacetResult.class, name = "Relewise.Client.DataTypes.Search.Facets.Result.DataObjectFacetResult, Relewise.Client"), @JsonSubTypes.Type(value = CategoryHierarchyFacetResult.class, name = "Relewise.Client.DataTypes.Search.Facets.Result.CategoryHierarchyFacetResult, Relewise.Client"), + @JsonSubTypes.Type(value = RecentlyPurchasedFacetResult.class, name = "Relewise.Client.DataTypes.Search.Facets.Result.RecentlyPurchasedFacetResult, Relewise.Client"), }) @JsonIgnoreProperties(ignoreUnknown = true) public abstract class FacetResult diff --git a/src/src/main/java/com/relewise/client/model/FacetingField.java b/src/src/main/java/com/relewise/client/model/FacetingField.java index 3c4db6c..2870784 100644 --- a/src/src/main/java/com/relewise/client/model/FacetingField.java +++ b/src/src/main/java/com/relewise/client/model/FacetingField.java @@ -54,4 +54,9 @@ public String toString() { return "VariantSpecification"; } }, + User { + public String toString() { + return "User"; + } + }, } diff --git a/src/src/main/java/com/relewise/client/model/Filter.java b/src/src/main/java/com/relewise/client/model/Filter.java index f19b7da..ee08a8c 100644 --- a/src/src/main/java/com/relewise/client/model/Filter.java +++ b/src/src/main/java/com/relewise/client/model/Filter.java @@ -91,6 +91,7 @@ @JsonSubTypes.Type(value = CompanyDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.CompanyDataHasKeyFilter, Relewise.Client"), @JsonSubTypes.Type(value = ProductHasCategoriesFilter.class, name = "Relewise.Client.Requests.Filters.ProductHasCategoriesFilter, Relewise.Client"), @JsonSubTypes.Type(value = ContentHasCategoriesFilter.class, name = "Relewise.Client.Requests.Filters.ContentHasCategoriesFilter, Relewise.Client"), + @JsonSubTypes.Type(value = ProductInCartFilter.class, name = "Relewise.Client.Requests.Filters.ProductInCartFilter, Relewise.Client"), }) @JsonIgnoreProperties(ignoreUnknown = true) public abstract class Filter diff --git a/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java b/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java index a1b67f9..34e505e 100644 --- a/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java +++ b/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java @@ -30,6 +30,7 @@ @JsonSubTypes.Type(value = ObjectValueMinByCondition.class, name = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueMinByCondition, Relewise.Client"), @JsonSubTypes.Type(value = ObjectValueMaxByCondition.class, name = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueMaxByCondition, Relewise.Client"), @JsonSubTypes.Type(value = ObjectValueRelativeDateTimeCondition.class, name = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueRelativeDateTimeCondition, Relewise.Client"), + @JsonSubTypes.Type(value = ObjectValueIsSubsetOfCondition.class, name = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueIsSubsetOfCondition, Relewise.Client"), }) @JsonIgnoreProperties(ignoreUnknown = true) public abstract class ObjectValueCondition diff --git a/src/src/main/java/com/relewise/client/model/ObjectValueIsSubsetOfCondition.java b/src/src/main/java/com/relewise/client/model/ObjectValueIsSubsetOfCondition.java new file mode 100644 index 0000000..8d3a07f --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/ObjectValueIsSubsetOfCondition.java @@ -0,0 +1,117 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "$type", + defaultImpl = ObjectValueIsSubsetOfCondition.class) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ObjectValueIsSubsetOfCondition extends ObjectValueCondition +{ + public String $type = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueIsSubsetOfCondition, Relewise.Client"; + public DataValue value; + public static ObjectValueIsSubsetOfCondition create(String key, String[] objectPath, DataValue value) + { + return new ObjectValueIsSubsetOfCondition(key, objectPath, value); + } + public ObjectValueIsSubsetOfCondition(String key, String[] objectPath, DataValue value) + { + this.key = key; + this.objectPath = objectPath; + this.value = value; + this.negated = false; + } + public static ObjectValueIsSubsetOfCondition create(String key, String[] objectPath, DataValue value, Boolean negated) + { + return new ObjectValueIsSubsetOfCondition(key, objectPath, value, negated); + } + public ObjectValueIsSubsetOfCondition(String key, String[] objectPath, DataValue value, Boolean negated) + { + this.key = key; + this.objectPath = objectPath; + this.value = value; + this.negated = negated; + } + public static ObjectValueIsSubsetOfCondition create(String key, DataValue value) + { + return new ObjectValueIsSubsetOfCondition(key, value); + } + public ObjectValueIsSubsetOfCondition(String key, DataValue value) + { + this.key = key; + this.value = value; + this.negated = false; + } + public static ObjectValueIsSubsetOfCondition create(String key, DataValue value, Boolean negated) + { + return new ObjectValueIsSubsetOfCondition(key, value, negated); + } + public ObjectValueIsSubsetOfCondition(String key, DataValue value, Boolean negated) + { + this.key = key; + this.value = value; + this.negated = negated; + } + public ObjectValueIsSubsetOfCondition() + { + this.negated = false; + } + public DataValue getValue() + { + return this.value; + } + public ObjectValueIsSubsetOfCondition setValue(DataValue value) + { + this.value = value; + return this; + } + @Override + public ObjectValueIsSubsetOfCondition setNegated(Boolean negated) + { + this.negated = negated; + return this; + } + @Override + public ObjectValueIsSubsetOfCondition setKey(String key) + { + this.key = key; + return this; + } + @Override + public ObjectValueIsSubsetOfCondition setObjectPath(String... objectPath) + { + this.objectPath = objectPath; + return this; + } + public ObjectValueIsSubsetOfCondition addToObjectPath(String objectPath) + { + if (this.objectPath == null) + { + this.objectPath = new String[] { objectPath }; + } + else + { + ArrayList existingList = new ArrayList<>(Arrays.asList(this.objectPath)); + existingList.add(objectPath); + this.objectPath = existingList.toArray(new String[0]); + } + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductCategoryDataRelevanceModifier.java index a4082f5..4ae65f1 100644 --- a/src/src/main/java/com/relewise/client/model/ProductCategoryDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductCategoryDataRelevanceModifier.java @@ -42,7 +42,10 @@ public ProductCategoryDataRelevanceModifier(String key, ArrayListRelevanceModifier that can change the relevance of a ProductCategory depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public static ProductCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { @@ -51,7 +54,10 @@ public static ProductCategoryDataRelevanceModifier create(String key, ArrayList< /** * Creates a RelevanceModifier that can change the relevance of a ProductCategory depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public ProductCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java index b1f0625..3bf842c 100644 --- a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java +++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java @@ -20,8 +20,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ProductChangeTriggerResultSettings { - public SelectedProductPropertiesSettings selectedProductProperties; - public SelectedVariantPropertiesSettings selectedVariantProperties; + public SelectedProductDetailsPropertiesSettings selectedProductProperties; + public SelectedVariantDetailsPropertiesSettings selectedVariantProperties; public static ProductChangeTriggerResultSettings create() { return new ProductChangeTriggerResultSettings(); @@ -29,20 +29,20 @@ public static ProductChangeTriggerResultSettings create() public ProductChangeTriggerResultSettings() { } - public SelectedProductPropertiesSettings getSelectedProductProperties() + public SelectedProductDetailsPropertiesSettings getSelectedProductProperties() { return this.selectedProductProperties; } - public SelectedVariantPropertiesSettings getSelectedVariantProperties() + public SelectedVariantDetailsPropertiesSettings getSelectedVariantProperties() { return this.selectedVariantProperties; } - public ProductChangeTriggerResultSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties) + public ProductChangeTriggerResultSettings setSelectedProductProperties(SelectedProductDetailsPropertiesSettings selectedProductProperties) { this.selectedProductProperties = selectedProductProperties; return this; } - public ProductChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantPropertiesSettings selectedVariantProperties) + public ProductChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantDetailsPropertiesSettings selectedVariantProperties) { this.selectedVariantProperties = selectedVariantProperties; return this; diff --git a/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacetResult.java b/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacetResult.java index 8ea2271..3e79356 100644 --- a/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacetResult.java +++ b/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacetResult.java @@ -17,6 +17,7 @@ import java.util.Set; import java.util.HashSet; +/** @deprecated Use ProductDataDoubleValueFacetResult instead */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, diff --git a/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java index 73c21d3..42e143e 100644 --- a/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java @@ -42,7 +42,10 @@ public ProductDataRelevanceModifier(String key, ArrayList condit /** * Creates a RelevanceModifier that can change the relevance of a Product depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public static ProductDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { @@ -51,7 +54,10 @@ public static ProductDataRelevanceModifier create(String key, ArrayListRelevanceModifier that can change the relevance of a Product depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public ProductDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { diff --git a/src/src/main/java/com/relewise/client/model/ProductInCartFilter.java b/src/src/main/java/com/relewise/client/model/ProductInCartFilter.java new file mode 100644 index 0000000..4b5fc4f --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/ProductInCartFilter.java @@ -0,0 +1,66 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +/** a Filter that can filter on whether the product is present in the cart associated to the User used in this query. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "$type", + defaultImpl = ProductInCartFilter.class) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ProductInCartFilter extends Filter implements IProductFilter +{ + public String $type = "Relewise.Client.Requests.Filters.ProductInCartFilter, Relewise.Client"; + public static ProductInCartFilter create() + { + return new ProductInCartFilter(); + } + public ProductInCartFilter() + { + this.negated = false; + } + /** + * Creates a Filter that can filter on whether the product is present in the cart associated to the User used in this query. + * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities. + */ + public static ProductInCartFilter create(Boolean negated) + { + return new ProductInCartFilter(negated); + } + /** + * Creates a Filter that can filter on whether the product is present in the cart associated to the User used in this query. + * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities. + */ + public ProductInCartFilter(Boolean negated) + { + this.negated = negated; + } + @Override + public ProductInCartFilter setNegated(Boolean negated) + { + this.negated = negated; + return this; + } + @Override + public ProductInCartFilter setSettings(@Nullable FilterSettings settings) + { + this.settings = settings; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/ProductInterestTriggerResultResultSettings.java b/src/src/main/java/com/relewise/client/model/ProductInterestTriggerResultResultSettings.java index d5b1056..a3a868a 100644 --- a/src/src/main/java/com/relewise/client/model/ProductInterestTriggerResultResultSettings.java +++ b/src/src/main/java/com/relewise/client/model/ProductInterestTriggerResultResultSettings.java @@ -20,8 +20,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ProductInterestTriggerResultResultSettings { - public SelectedProductPropertiesSettings selectedProductProperties; - public SelectedVariantPropertiesSettings selectedVariantProperties; + public SelectedProductDetailsPropertiesSettings selectedProductProperties; + public SelectedVariantDetailsPropertiesSettings selectedVariantProperties; public static ProductInterestTriggerResultResultSettings create() { return new ProductInterestTriggerResultResultSettings(); @@ -29,20 +29,20 @@ public static ProductInterestTriggerResultResultSettings create() public ProductInterestTriggerResultResultSettings() { } - public SelectedProductPropertiesSettings getSelectedProductProperties() + public SelectedProductDetailsPropertiesSettings getSelectedProductProperties() { return this.selectedProductProperties; } - public SelectedVariantPropertiesSettings getSelectedVariantProperties() + public SelectedVariantDetailsPropertiesSettings getSelectedVariantProperties() { return this.selectedVariantProperties; } - public ProductInterestTriggerResultResultSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties) + public ProductInterestTriggerResultResultSettings setSelectedProductProperties(SelectedProductDetailsPropertiesSettings selectedProductProperties) { this.selectedProductProperties = selectedProductProperties; return this; } - public ProductInterestTriggerResultResultSettings setSelectedVariantProperties(SelectedVariantPropertiesSettings selectedVariantProperties) + public ProductInterestTriggerResultResultSettings setSelectedVariantProperties(SelectedVariantDetailsPropertiesSettings selectedVariantProperties) { this.selectedVariantProperties = selectedVariantProperties; return this; diff --git a/src/src/main/java/com/relewise/client/model/ProductQuery.java b/src/src/main/java/com/relewise/client/model/ProductQuery.java index 0564487..32ad346 100644 --- a/src/src/main/java/com/relewise/client/model/ProductQuery.java +++ b/src/src/main/java/com/relewise/client/model/ProductQuery.java @@ -41,6 +41,8 @@ public class ProductQuery extends LicensedRequest public @Nullable UUID nextPageToken; /** The size of the page requested. Maximum allowed value is 1000. */ public @Nullable Integer pageSize; + /** Settings for which properties should be included for the entities in the response. If settings are not set they default to include everything. */ + public @Nullable ProductQuerySelectedPropertiesSettings resultSettings; public static ProductQuery create(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants) { return new ProductQuery(filters, excludeProductsWithNoVariants); @@ -141,6 +143,11 @@ public Boolean getExcludeProductsWithNoVariants() { return this.pageSize; } + /** Settings for which properties should be included for the entities in the response. If settings are not set they default to include everything. */ + public @Nullable ProductQuerySelectedPropertiesSettings getResultSettings() + { + return this.resultSettings; + } public ProductQuery setFilters(@Nullable FilterCollection filters) { this.filters = filters; @@ -200,4 +207,10 @@ public ProductQuery setPageSize(@Nullable Integer pageSize) this.pageSize = pageSize; return this; } + /** Settings for which properties should be included for the entities in the response. If settings are not set they default to include everything. */ + public ProductQuery setResultSettings(@Nullable ProductQuerySelectedPropertiesSettings resultSettings) + { + this.resultSettings = resultSettings; + return this; + } } diff --git a/src/src/main/java/com/relewise/client/model/ProductQuerySelectedPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/ProductQuerySelectedPropertiesSettings.java new file mode 100644 index 0000000..d43949f --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/ProductQuerySelectedPropertiesSettings.java @@ -0,0 +1,57 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +/** Settings for which properties should be mapped for the result of the ProductQuery. If settings are not set they default to include everything. */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class ProductQuerySelectedPropertiesSettings +{ + /** Settings for which properties should be mapped for the ProductResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public @Nullable SelectedProductDetailsPropertiesSettings selectedProductDetailsProperties; + /** Settings for which properties should be mapped for the VariantResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public @Nullable SelectedVariantDetailsPropertiesSettings selectedVariantDetailsProperties; + public static ProductQuerySelectedPropertiesSettings create() + { + return new ProductQuerySelectedPropertiesSettings(); + } + public ProductQuerySelectedPropertiesSettings() + { + } + /** Settings for which properties should be mapped for the ProductResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public @Nullable SelectedProductDetailsPropertiesSettings getSelectedProductDetailsProperties() + { + return this.selectedProductDetailsProperties; + } + /** Settings for which properties should be mapped for the VariantResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public @Nullable SelectedVariantDetailsPropertiesSettings getSelectedVariantDetailsProperties() + { + return this.selectedVariantDetailsProperties; + } + /** Settings for which properties should be mapped for the ProductResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public ProductQuerySelectedPropertiesSettings setSelectedProductDetailsProperties(@Nullable SelectedProductDetailsPropertiesSettings selectedProductDetailsProperties) + { + this.selectedProductDetailsProperties = selectedProductDetailsProperties; + return this; + } + /** Settings for which properties should be mapped for the VariantResultDetails in the ProductDetailsCollectionResponse returned for the current ProductQuery. */ + public ProductQuerySelectedPropertiesSettings setSelectedVariantDetailsProperties(@Nullable SelectedVariantDetailsPropertiesSettings selectedVariantDetailsProperties) + { + this.selectedVariantDetailsProperties = selectedVariantDetailsProperties; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/ProductResultDetails.java b/src/src/main/java/com/relewise/client/model/ProductResultDetails.java index 43b98b1..a26bf98 100644 --- a/src/src/main/java/com/relewise/client/model/ProductResultDetails.java +++ b/src/src/main/java/com/relewise/client/model/ProductResultDetails.java @@ -22,6 +22,7 @@ public class ProductResultDetails { public String productId; public Multilingual displayName; + /** @deprecated Not in use, this will always be null */ public VariantResult variant; public Integer[] assortments; public HashMap data; @@ -61,6 +62,7 @@ public Multilingual getDisplayName() { return this.displayName; } + /** @deprecated Not in use, this will always be null */ public VariantResult getVariant() { return this.variant; @@ -151,6 +153,7 @@ public ProductResultDetails setDisplayName(Multilingual displayName) this.displayName = displayName; return this; } + /** @deprecated Not in use, this will always be null */ public ProductResultDetails setVariant(VariantResult variant) { this.variant = variant; diff --git a/src/src/main/java/com/relewise/client/model/PurchaseQualifiers.java b/src/src/main/java/com/relewise/client/model/PurchaseQualifiers.java new file mode 100644 index 0000000..ec8d339 --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/PurchaseQualifiers.java @@ -0,0 +1,110 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +/** Determines what qualifies a purchase as recently purchased */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "$type", + defaultImpl = PurchaseQualifiers.class) +@JsonIgnoreProperties(ignoreUnknown = true) +public class PurchaseQualifiers implements PurchaseQualifiersIEquatable +{ + public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.PurchaseQualifiers, Relewise.Client"; + /** How fresh recent purchase must be to count as hit? */ + public Integer sinceMinutesAgo; + /** Should hit be count if user recently purchased product? */ + public Boolean byUser; + /** Should hit be count if user company recently had a product purchase tracked? */ + public Boolean byUserCompany; + /** Should hit be count if user parent company recently had a product purchase tracked? */ + public Boolean byUserParentCompany; + /** + * Creates Determines what qualifies a purchase as recently purchased + * @param sinceMinutesAgo How fresh recent purchase must be to count as hit? + * @param byUser Should hit be count if user recently purchased product? + * @param byUserCompany Should hit be count if user company recently had a product purchase tracked? + * @param byUserParentCompany Should hit be count if user parent company recently had a product purchase tracked? + */ + public static PurchaseQualifiers create(Integer sinceMinutesAgo, Boolean byUser, Boolean byUserCompany, Boolean byUserParentCompany) + { + return new PurchaseQualifiers(sinceMinutesAgo, byUser, byUserCompany, byUserParentCompany); + } + /** + * Creates Determines what qualifies a purchase as recently purchased + * @param sinceMinutesAgo How fresh recent purchase must be to count as hit? + * @param byUser Should hit be count if user recently purchased product? + * @param byUserCompany Should hit be count if user company recently had a product purchase tracked? + * @param byUserParentCompany Should hit be count if user parent company recently had a product purchase tracked? + */ + public PurchaseQualifiers(Integer sinceMinutesAgo, Boolean byUser, Boolean byUserCompany, Boolean byUserParentCompany) + { + this.sinceMinutesAgo = sinceMinutesAgo; + this.byUser = byUser; + this.byUserCompany = byUserCompany; + this.byUserParentCompany = byUserParentCompany; + } + public PurchaseQualifiers() + { + } + /** How fresh recent purchase must be to count as hit? */ + public Integer getSinceMinutesAgo() + { + return this.sinceMinutesAgo; + } + /** Should hit be count if user recently purchased product? */ + public Boolean getByUser() + { + return this.byUser; + } + /** Should hit be count if user company recently had a product purchase tracked? */ + public Boolean getByUserCompany() + { + return this.byUserCompany; + } + /** Should hit be count if user parent company recently had a product purchase tracked? */ + public Boolean getByUserParentCompany() + { + return this.byUserParentCompany; + } + /** How fresh recent purchase must be to count as hit? */ + public PurchaseQualifiers setSinceMinutesAgo(Integer sinceMinutesAgo) + { + this.sinceMinutesAgo = sinceMinutesAgo; + return this; + } + /** Should hit be count if user recently purchased product? */ + public PurchaseQualifiers setByUser(Boolean byUser) + { + this.byUser = byUser; + return this; + } + /** Should hit be count if user company recently had a product purchase tracked? */ + public PurchaseQualifiers setByUserCompany(Boolean byUserCompany) + { + this.byUserCompany = byUserCompany; + return this; + } + /** Should hit be count if user parent company recently had a product purchase tracked? */ + public PurchaseQualifiers setByUserParentCompany(Boolean byUserParentCompany) + { + this.byUserParentCompany = byUserParentCompany; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/PurchaseQualifiersIEquatable.java b/src/src/main/java/com/relewise/client/model/PurchaseQualifiersIEquatable.java new file mode 100644 index 0000000..fa13c4d --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/PurchaseQualifiersIEquatable.java @@ -0,0 +1,22 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +public interface PurchaseQualifiersIEquatable +{ +} diff --git a/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacet.java b/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacet.java new file mode 100644 index 0000000..5d27b28 --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacet.java @@ -0,0 +1,89 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +/** Performs facetting based on if product is known to be purchased recently (within !: SinceMinutesAgo), applicable only for product searches. Requires at least one level of selection, whether !:ByUser, or !:ByUserCompany, or !:ByUserParentCompany. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "$type", + defaultImpl = RecentlyPurchasedFacet.class) +@JsonIgnoreProperties(ignoreUnknown = true) +public class RecentlyPurchasedFacet extends BooleanValueFacet +{ + public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.RecentlyPurchasedFacet, Relewise.Client"; + public PurchaseQualifiers purchaseQualifiers; + public static RecentlyPurchasedFacet create(PurchaseQualifiers purchaseQualifiers) + { + return new RecentlyPurchasedFacet(purchaseQualifiers); + } + public RecentlyPurchasedFacet(PurchaseQualifiers purchaseQualifiers) + { + this.purchaseQualifiers = purchaseQualifiers; + this.selected = null; + } + public static RecentlyPurchasedFacet create(PurchaseQualifiers purchaseQualifiers, Boolean... selected) + { + return new RecentlyPurchasedFacet(purchaseQualifiers, selected); + } + public RecentlyPurchasedFacet(PurchaseQualifiers purchaseQualifiers, Boolean... selected) + { + this.purchaseQualifiers = purchaseQualifiers; + this.selected = new ArrayList<>(Arrays.asList(selected)); + } + public RecentlyPurchasedFacet() + { + this.selected = null; + } + public PurchaseQualifiers getPurchaseQualifiers() + { + return this.purchaseQualifiers; + } + public RecentlyPurchasedFacet setPurchaseQualifiers(PurchaseQualifiers purchaseQualifiers) + { + this.purchaseQualifiers = purchaseQualifiers; + return this; + } + @Override + public RecentlyPurchasedFacet setSelected(Boolean... selected) + { + this.selected = new ArrayList<>(Arrays.asList(selected));; + return this; + } + public RecentlyPurchasedFacet addToSelected(Boolean selected) + { + if (this.selected == null) + { + this.selected = new ArrayList<>(); + } + this.selected.add(selected); + return this; + } + @Override + public RecentlyPurchasedFacet setField(FacetingField field) + { + this.field = field; + return this; + } + @Override + public RecentlyPurchasedFacet setSettings(@Nullable FacetSettings settings) + { + this.settings = settings; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacetResult.java b/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacetResult.java new file mode 100644 index 0000000..77a89ce --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/RecentlyPurchasedFacetResult.java @@ -0,0 +1,89 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +/** A result for RecentlyPurchasedFacet. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "$type", + defaultImpl = RecentlyPurchasedFacetResult.class) +@JsonIgnoreProperties(ignoreUnknown = true) +public class RecentlyPurchasedFacetResult extends BooleanBooleanValueFacetResult +{ + public String $type = "Relewise.Client.DataTypes.Search.Facets.Result.RecentlyPurchasedFacetResult, Relewise.Client"; + public PurchaseQualifiers purchaseQualifiers; + public static RecentlyPurchasedFacetResult create(PurchaseQualifiers purchaseQualifiers, ArrayList selected, BooleanAvailableFacetValue... available) + { + return new RecentlyPurchasedFacetResult(purchaseQualifiers, selected, available); + } + public RecentlyPurchasedFacetResult(PurchaseQualifiers purchaseQualifiers, ArrayList selected, BooleanAvailableFacetValue... available) + { + this.purchaseQualifiers = purchaseQualifiers; + this.selected = selected; + this.available = new ArrayList<>(Arrays.asList(available)); + } + public RecentlyPurchasedFacetResult() + { + } + public PurchaseQualifiers getPurchaseQualifiers() + { + return this.purchaseQualifiers; + } + public RecentlyPurchasedFacetResult setPurchaseQualifiers(PurchaseQualifiers purchaseQualifiers) + { + this.purchaseQualifiers = purchaseQualifiers; + return this; + } + @Override + public RecentlyPurchasedFacetResult setSelected(Boolean... selected) + { + this.selected = new ArrayList<>(Arrays.asList(selected));; + return this; + } + public RecentlyPurchasedFacetResult addToSelected(Boolean selected) + { + if (this.selected == null) + { + this.selected = new ArrayList<>(); + } + this.selected.add(selected); + return this; + } + @Override + public RecentlyPurchasedFacetResult setAvailable(BooleanAvailableFacetValue... available) + { + this.available = new ArrayList<>(Arrays.asList(available));; + return this; + } + public RecentlyPurchasedFacetResult addToAvailable(BooleanAvailableFacetValue available) + { + if (this.available == null) + { + this.available = new ArrayList<>(); + } + this.available.add(available); + return this; + } + @Override + public RecentlyPurchasedFacetResult setField(FacetingField field) + { + this.field = field; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/SelectedProductDetailsPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedProductDetailsPropertiesSettings.java new file mode 100644 index 0000000..9e428fe --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/SelectedProductDetailsPropertiesSettings.java @@ -0,0 +1,174 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SelectedProductDetailsPropertiesSettings +{ + public Boolean displayName; + public Boolean categoryPaths; + public Boolean assortments; + public Boolean pricing; + public Boolean allData; + public Boolean viewedByUserInfo; + public Boolean purchasedByUserInfo; + public Boolean brand; + public Boolean allVariants; + public @Nullable String[] dataKeys; + public Boolean viewedByUserCompanyInfo; + public Boolean purchasedByUserCompanyInfo; + public @Nullable FilteredVariantsSettings filteredVariants; + public static SelectedProductDetailsPropertiesSettings create() + { + return new SelectedProductDetailsPropertiesSettings(); + } + public SelectedProductDetailsPropertiesSettings() + { + } + public Boolean getDisplayName() + { + return this.displayName; + } + public Boolean getCategoryPaths() + { + return this.categoryPaths; + } + public Boolean getAssortments() + { + return this.assortments; + } + public Boolean getPricing() + { + return this.pricing; + } + public Boolean getAllData() + { + return this.allData; + } + public Boolean getViewedByUserInfo() + { + return this.viewedByUserInfo; + } + public Boolean getPurchasedByUserInfo() + { + return this.purchasedByUserInfo; + } + public Boolean getBrand() + { + return this.brand; + } + public Boolean getAllVariants() + { + return this.allVariants; + } + public @Nullable String[] getDataKeys() + { + return this.dataKeys; + } + public Boolean getViewedByUserCompanyInfo() + { + return this.viewedByUserCompanyInfo; + } + public Boolean getPurchasedByUserCompanyInfo() + { + return this.purchasedByUserCompanyInfo; + } + public @Nullable FilteredVariantsSettings getFilteredVariants() + { + return this.filteredVariants; + } + public SelectedProductDetailsPropertiesSettings setDisplayName(Boolean displayName) + { + this.displayName = displayName; + return this; + } + public SelectedProductDetailsPropertiesSettings setCategoryPaths(Boolean categoryPaths) + { + this.categoryPaths = categoryPaths; + return this; + } + public SelectedProductDetailsPropertiesSettings setAssortments(Boolean assortments) + { + this.assortments = assortments; + return this; + } + public SelectedProductDetailsPropertiesSettings setPricing(Boolean pricing) + { + this.pricing = pricing; + return this; + } + public SelectedProductDetailsPropertiesSettings setAllData(Boolean allData) + { + this.allData = allData; + return this; + } + public SelectedProductDetailsPropertiesSettings setViewedByUserInfo(Boolean viewedByUserInfo) + { + this.viewedByUserInfo = viewedByUserInfo; + return this; + } + public SelectedProductDetailsPropertiesSettings setPurchasedByUserInfo(Boolean purchasedByUserInfo) + { + this.purchasedByUserInfo = purchasedByUserInfo; + return this; + } + public SelectedProductDetailsPropertiesSettings setBrand(Boolean brand) + { + this.brand = brand; + return this; + } + public SelectedProductDetailsPropertiesSettings setAllVariants(Boolean allVariants) + { + this.allVariants = allVariants; + return this; + } + public SelectedProductDetailsPropertiesSettings setDataKeys(String... dataKeys) + { + this.dataKeys = dataKeys; + return this; + } + public SelectedProductDetailsPropertiesSettings addToDataKeys(String dataKey) + { + if (this.dataKeys == null) + { + this.dataKeys = new String[] { dataKey }; + } + else + { + ArrayList existingList = new ArrayList<>(Arrays.asList(this.dataKeys)); + existingList.add(dataKey); + this.dataKeys = existingList.toArray(new String[0]); + } + return this; + } + public SelectedProductDetailsPropertiesSettings setViewedByUserCompanyInfo(Boolean viewedByUserCompanyInfo) + { + this.viewedByUserCompanyInfo = viewedByUserCompanyInfo; + return this; + } + public SelectedProductDetailsPropertiesSettings setPurchasedByUserCompanyInfo(Boolean purchasedByUserCompanyInfo) + { + this.purchasedByUserCompanyInfo = purchasedByUserCompanyInfo; + return this; + } + public SelectedProductDetailsPropertiesSettings setFilteredVariants(@Nullable FilteredVariantsSettings filteredVariants) + { + this.filteredVariants = filteredVariants; + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/SelectedVariantDetailsPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedVariantDetailsPropertiesSettings.java new file mode 100644 index 0000000..fade003 --- /dev/null +++ b/src/src/main/java/com/relewise/client/model/SelectedVariantDetailsPropertiesSettings.java @@ -0,0 +1,128 @@ +package com.relewise.client.model; + +import com.fasterxml.jackson.annotation.*; +import javax.annotation.Nullable; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +import java.util.Objects; +import java.util.Arrays; +import java.util.UUID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.HashSet; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SelectedVariantDetailsPropertiesSettings +{ + public Boolean displayName; + public Boolean pricing; + public Boolean allSpecifications; + public Boolean assortments; + public Boolean allData; + public @Nullable String[] dataKeys; + public @Nullable String[] specificationKeys; + public static SelectedVariantDetailsPropertiesSettings create() + { + return new SelectedVariantDetailsPropertiesSettings(); + } + public SelectedVariantDetailsPropertiesSettings() + { + } + public Boolean getDisplayName() + { + return this.displayName; + } + public Boolean getPricing() + { + return this.pricing; + } + public Boolean getAllSpecifications() + { + return this.allSpecifications; + } + public Boolean getAssortments() + { + return this.assortments; + } + public Boolean getAllData() + { + return this.allData; + } + public @Nullable String[] getDataKeys() + { + return this.dataKeys; + } + public @Nullable String[] getSpecificationKeys() + { + return this.specificationKeys; + } + public SelectedVariantDetailsPropertiesSettings setDisplayName(Boolean displayName) + { + this.displayName = displayName; + return this; + } + public SelectedVariantDetailsPropertiesSettings setPricing(Boolean pricing) + { + this.pricing = pricing; + return this; + } + public SelectedVariantDetailsPropertiesSettings setAllSpecifications(Boolean allSpecifications) + { + this.allSpecifications = allSpecifications; + return this; + } + public SelectedVariantDetailsPropertiesSettings setAssortments(Boolean assortments) + { + this.assortments = assortments; + return this; + } + public SelectedVariantDetailsPropertiesSettings setAllData(Boolean allData) + { + this.allData = allData; + return this; + } + public SelectedVariantDetailsPropertiesSettings setDataKeys(String... dataKeys) + { + this.dataKeys = dataKeys; + return this; + } + public SelectedVariantDetailsPropertiesSettings addToDataKeys(String dataKey) + { + if (this.dataKeys == null) + { + this.dataKeys = new String[] { dataKey }; + } + else + { + ArrayList existingList = new ArrayList<>(Arrays.asList(this.dataKeys)); + existingList.add(dataKey); + this.dataKeys = existingList.toArray(new String[0]); + } + return this; + } + public SelectedVariantDetailsPropertiesSettings setSpecificationKeys(String... specificationKeys) + { + this.specificationKeys = specificationKeys; + return this; + } + public SelectedVariantDetailsPropertiesSettings addToSpecificationKeys(String specificationKey) + { + if (this.specificationKeys == null) + { + this.specificationKeys = new String[] { specificationKey }; + } + else + { + ArrayList existingList = new ArrayList<>(Arrays.asList(this.specificationKeys)); + existingList.add(specificationKey); + this.specificationKeys = existingList.toArray(new String[0]); + } + return this; + } +} diff --git a/src/src/main/java/com/relewise/client/model/SignificantDataValueSignificantDataValueComparer.java b/src/src/main/java/com/relewise/client/model/SignificantDataValueSignificantDataValueComparer.java index 5c57f9c..395e7c8 100644 --- a/src/src/main/java/com/relewise/client/model/SignificantDataValueSignificantDataValueComparer.java +++ b/src/src/main/java/com/relewise/client/model/SignificantDataValueSignificantDataValueComparer.java @@ -39,4 +39,9 @@ public String toString() { return "KeyExists"; } }, + CollectionOverlap { + public String toString() { + return "CollectionOverlap"; + } + }, } diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java index 9f7a7e6..697d677 100644 --- a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java +++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java @@ -20,8 +20,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class VariantChangeTriggerResultSettings { - public SelectedProductPropertiesSettings selectedProductProperties; - public SelectedVariantPropertiesSettings selectedVariantProperties; + public SelectedProductDetailsPropertiesSettings selectedProductProperties; + public SelectedVariantDetailsPropertiesSettings selectedVariantProperties; public static VariantChangeTriggerResultSettings create() { return new VariantChangeTriggerResultSettings(); @@ -29,20 +29,20 @@ public static VariantChangeTriggerResultSettings create() public VariantChangeTriggerResultSettings() { } - public SelectedProductPropertiesSettings getSelectedProductProperties() + public SelectedProductDetailsPropertiesSettings getSelectedProductProperties() { return this.selectedProductProperties; } - public SelectedVariantPropertiesSettings getSelectedVariantProperties() + public SelectedVariantDetailsPropertiesSettings getSelectedVariantProperties() { return this.selectedVariantProperties; } - public VariantChangeTriggerResultSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties) + public VariantChangeTriggerResultSettings setSelectedProductProperties(SelectedProductDetailsPropertiesSettings selectedProductProperties) { this.selectedProductProperties = selectedProductProperties; return this; } - public VariantChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantPropertiesSettings selectedVariantProperties) + public VariantChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantDetailsPropertiesSettings selectedVariantProperties) { this.selectedVariantProperties = selectedVariantProperties; return this; diff --git a/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java index 2322eda..2e3a15c 100644 --- a/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java @@ -42,7 +42,10 @@ public VariantDataRelevanceModifier(String key, ArrayList condit /** * Creates a RelevanceModifier that can change the relevance of a variant depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public static VariantDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) { @@ -51,7 +54,10 @@ public static VariantDataRelevanceModifier create(String key, ArrayListRelevanceModifier that can change the relevance of a variant depending on matching conditions on a certain key. * @param key The data key that this RelevanceModifier will distinguish on. - * @param conditions The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). + * @param conditions The conditions that must hold for the specific data Key in order for the entity to be boosted. + * @param multiplierSelector The selector for the multiplier which the entities parsing the Conditions will be have their rank multiplied by. It can either be a FixedDoubleValueSelector taking a fixed value or a DataDoubleSelector that can take the multiplier from a data key containing a double. + * @param mustMatchAllConditions Specifies whether all Conditions should parse their test on the specific data Key (true) or if only one is required (false). + * @param considerAsMatchIfKeyIsNotFound Specifies whether entities that don't have the specific data Key should be considered a match (true) or not (false). */ public VariantDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound) {