diff --git a/Generator/Extensions/StringExtensions.cs b/Generator/Extensions/StringExtensions.cs
index 7c6fb64e..2a743db5 100644
--- a/Generator/Extensions/StringExtensions.cs
+++ b/Generator/Extensions/StringExtensions.cs
@@ -20,4 +20,6 @@ public static string SingularIfPossible(this string value)
}
public static string RemoveNullable(this string value) => value.Length > 10 ? value[..10] is "@Nullable " ? value[10..] : value : value;
+
+ public static string AsFieldName(this string? fieldName) => fieldName == "default" ? "_default" : fieldName ?? null!;
}
\ No newline at end of file
diff --git a/Generator/Generator.csproj b/Generator/Generator.csproj
index 73d9d275..036adff5 100644
--- a/Generator/Generator.csproj
+++ b/Generator/Generator.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Generator/JavaMemberWriters/JavaCreatorMethodWriter.cs b/Generator/JavaMemberWriters/JavaCreatorMethodWriter.cs
index 9a2ce956..989a88ac 100644
--- a/Generator/JavaMemberWriters/JavaCreatorMethodWriter.cs
+++ b/Generator/JavaMemberWriters/JavaCreatorMethodWriter.cs
@@ -159,7 +159,7 @@ private void WriteConstructor(IndentedTextWriter writer, Type returnType, string
writer.WriteLine($"public static {typeName} create({ParameterList(parameters)})");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"return new {typeName}({string.Join(", ", parameters.Select(p => p.Name))});");
+ writer.WriteLine($"return new {typeName}({string.Join(", ", parameters.Select(p => p.Name.AsFieldName()))});");
writer.Indent--;
writer.WriteLine("}");
@@ -188,15 +188,15 @@ private void WriteCreatorMethodBody(IndentedTextWriter writer, string variable,
if (property!.PropertyType.IsGenericType && property!.PropertyType.GetGenericTypeDefinition() == typeof(List<>) && (parameter.ParameterType.IsArray
|| (parameter == parameters.Last() && javaWriter.BetterTypedParameterTypeName(parameter.ParameterType, new NullabilityInfoContext().Create(parameter)).Contains("..."))))
{
- writer.WriteLine($"{variable}.{propertyName} = new ArrayList<>(Arrays.asList({parameter.Name}));");
+ writer.WriteLine($"{variable}.{propertyName.AsFieldName()} = new ArrayList<>(Arrays.asList({parameter.Name.AsFieldName()}));");
}
else if (property!.PropertyType.IsArray && parameter.ParameterType.IsGenericType && parameter.ParameterType.GetGenericTypeDefinition() == typeof(List<>))
{
- writer.WriteLine($"{variable}.{propertyName} = {parameter.Name}.asArray();");
+ writer.WriteLine($"{variable}.{propertyName.AsFieldName()} = {parameter.Name.AsFieldName()}.asArray();");
}
else
{
- writer.WriteLine($"{variable}.{propertyName} = {parameter.Name};");
+ writer.WriteLine($"{variable}.{propertyName.AsFieldName()} = {parameter.Name.AsFieldName()};");
}
}
}
@@ -206,7 +206,7 @@ private void WriteCreatorMethodBody(IndentedTextWriter writer, string variable,
string? propertyName = property?.Name.ToCamelCase();
if (propertyName is not null)
{
- writer.WriteLine($"{variable}.{propertyName}{DefaultValueSetter(parameter)};");
+ writer.WriteLine($"{variable}.{propertyName.AsFieldName()}{DefaultValueSetter(parameter)};");
}
}
}
@@ -251,6 +251,7 @@ private string LiteralValueExpression(object obj)
int number => $"{number}",
double number => $"{number.ToString(CultureInfo.InvariantCulture)}d",
float number => $"{number.ToString(CultureInfo.InvariantCulture)}f",
+ long number => $"{number.ToString(CultureInfo.InvariantCulture)}L",
string stringLiteral => $"\"{stringLiteral}\"",
_ when obj.GetType().IsEnum => $"{javaWriter.TypeName(obj.GetType())}.{obj}",
_ => System.Text.Json.JsonSerializer.Serialize(obj)
@@ -261,7 +262,7 @@ private string ParameterList(ParameterInfo[] parameters)
{
return string.Join(", ",
parameters.Select(parameter =>
- $"{(parameters[^1] == parameter ? javaWriter.BetterTypedParameterTypeName(parameter.ParameterType, new NullabilityInfoContext().Create(parameter)) : javaWriter.TypeName(parameter))} {parameter.Name}"
+ $"{(parameters[^1] == parameter ? javaWriter.BetterTypedParameterTypeName(parameter.ParameterType, new NullabilityInfoContext().Create(parameter)) : javaWriter.TypeName(parameter))} {parameter.Name.AsFieldName()}"
)
);
}
diff --git a/Generator/JavaMemberWriters/JavaFieldWriter.cs b/Generator/JavaMemberWriters/JavaFieldWriter.cs
index b98f4b63..49d42dab 100644
--- a/Generator/JavaMemberWriters/JavaFieldWriter.cs
+++ b/Generator/JavaMemberWriters/JavaFieldWriter.cs
@@ -22,7 +22,7 @@ public void Write(IndentedTextWriter writer, Type classType, (PropertyInfo type,
propertyInfo.GetCustomAttribute(typeof(ObsoleteAttribute)) is ObsoleteAttribute { } obsolete ? $"@deprecated {obsolete.Message}" : null
);
- writer.WriteLine($"public {propertyTypeName} {lowerCaseName};");
+ writer.WriteLine($"public {propertyTypeName} {lowerCaseName.AsFieldName()};");
}
}
}
\ No newline at end of file
diff --git a/Generator/JavaMemberWriters/JavaPropertyGetterMethodsWriter.cs b/Generator/JavaMemberWriters/JavaPropertyGetterMethodsWriter.cs
index e3f8f035..1542091f 100644
--- a/Generator/JavaMemberWriters/JavaPropertyGetterMethodsWriter.cs
+++ b/Generator/JavaMemberWriters/JavaPropertyGetterMethodsWriter.cs
@@ -22,10 +22,15 @@ public void Write(IndentedTextWriter writer, Type classType, (PropertyInfo info,
propertyInfo.GetCustomAttribute(typeof(ObsoleteAttribute)) is ObsoleteAttribute { } obsolete ? $"@deprecated {obsolete.Message}" : null
);
+ if (lowerCaseName == "default")
+ {
+ writer.WriteLine("@JsonProperty(\"default\")");
+ }
+
writer.WriteLine($"public {propertyTypeName} get{propertyName}()");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"return this.{lowerCaseName};");
+ writer.WriteLine($"return this.{lowerCaseName.AsFieldName()};");
writer.Indent--;
writer.WriteLine("}");
}
diff --git a/Generator/JavaMemberWriters/JavaPropertySetterMethodsWriter.cs b/Generator/JavaMemberWriters/JavaPropertySetterMethodsWriter.cs
index 1bb9fab8..b8596010 100644
--- a/Generator/JavaMemberWriters/JavaPropertySetterMethodsWriter.cs
+++ b/Generator/JavaMemberWriters/JavaPropertySetterMethodsWriter.cs
@@ -49,10 +49,10 @@ public void Write(IndentedTextWriter writer, Type returnType, string returnTypeN
{
writer.WriteLine("@Override");
}
- writer.WriteLine($"public {returnTypeName} set{propertyName}({parameterType} {lowerCaseName})");
+ writer.WriteLine($"public {returnTypeName} set{propertyName}({parameterType} {lowerCaseName.AsFieldName()})");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"this.{javaWriter.ValueSetter(propertyType, lowerCaseName, propertyType is { IsGenericType: true } genericType && genericType.GetGenericTypeDefinition() == typeof(List<>) ? (genericType.GenericTypeArguments[0]).MakeArrayType() : propertyType, lowerCaseName)};");
+ writer.WriteLine($"this.{javaWriter.ValueSetter(propertyType, lowerCaseName.AsFieldName(), propertyType is { IsGenericType: true } genericType && genericType.GetGenericTypeDefinition() == typeof(List<>) ? (genericType.GenericTypeArguments[0]).MakeArrayType() : propertyType, lowerCaseName.AsFieldName())};");
writer.WriteLine("return this;");
writer.Indent--;
writer.WriteLine("}");
@@ -64,21 +64,21 @@ public void Write(IndentedTextWriter writer, Type returnType, string returnTypeN
deprecationComment
);
var elementType = propertyType.GetElementType()!;
- writer.WriteLine($"public {returnTypeName} addTo{propertyName}({javaWriter.TypeName(elementType)} {lowerCaseName.SingularIfPossible()})");
+ writer.WriteLine($"public {returnTypeName} addTo{propertyName}({javaWriter.TypeName(elementType)} {lowerCaseName.SingularIfPossible().AsFieldName()})");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"if (this.{lowerCaseName} == null)");
+ writer.WriteLine($"if (this.{lowerCaseName.AsFieldName()} == null)");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"this.{lowerCaseName} = new {javaWriter.TypeName(elementType)}[] {{ {lowerCaseName.SingularIfPossible()} }};");
+ writer.WriteLine($"this.{lowerCaseName.AsFieldName()} = new {javaWriter.TypeName(elementType)}[] {{ {lowerCaseName.SingularIfPossible().AsFieldName()} }};");
writer.Indent--;
writer.WriteLine("}");
writer.WriteLine("else");
writer.WriteLine("{");
writer.Indent++;
writer.WriteLine($"ArrayList<{javaWriter.TypeName(elementType)}> existingList = new ArrayList<>(Arrays.asList(this.{lowerCaseName}));");
- writer.WriteLine($"existingList.add({lowerCaseName.SingularIfPossible()});");
- writer.WriteLine($"this.{lowerCaseName} = existingList.toArray({NewUpper(javaWriter.TypeName(elementType))}[0]);");
+ writer.WriteLine($"existingList.add({lowerCaseName.SingularIfPossible().AsFieldName()});");
+ writer.WriteLine($"this.{lowerCaseName.AsFieldName()} = existingList.toArray({NewUpper(javaWriter.TypeName(elementType))}[0]);");
writer.Indent--;
writer.WriteLine("}");
writer.WriteLine("return this;");
@@ -92,16 +92,16 @@ public void Write(IndentedTextWriter writer, Type returnType, string returnTypeN
javaWriter.XmlDocumentation.GetSummary(returnType, propertyName),
deprecationComment
);
- writer.WriteLine($"public {returnTypeName} addTo{propertyName}({javaWriter.TypeName(propertyType.GenericTypeArguments[0])} {lowerCaseName})");
+ writer.WriteLine($"public {returnTypeName} addTo{propertyName}({javaWriter.TypeName(propertyType.GenericTypeArguments[0])} {lowerCaseName.AsFieldName()})");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"if (this.{lowerCaseName} == null)");
+ writer.WriteLine($"if (this.{lowerCaseName.AsFieldName()} == null)");
writer.WriteLine("{");
writer.Indent++;
- writer.WriteLine($"this.{lowerCaseName} = new ArrayList<>();");
+ writer.WriteLine($"this.{lowerCaseName.AsFieldName()} = new ArrayList<>();");
writer.Indent--;
writer.WriteLine("}");
- writer.WriteLine($"this.{lowerCaseName}.add({lowerCaseName});");
+ writer.WriteLine($"this.{lowerCaseName.AsFieldName()}.add({lowerCaseName.AsFieldName()});");
writer.WriteLine("return this;");
writer.Indent--;
diff --git a/Generator/JavaTypeResolver.cs b/Generator/JavaTypeResolver.cs
index c8e5e5c3..db940133 100644
--- a/Generator/JavaTypeResolver.cs
+++ b/Generator/JavaTypeResolver.cs
@@ -97,12 +97,9 @@ private string AddCollectionTypeDefinition(Type type)
private string GetGenericTypeDefinition(Type type)
{
// We use `RemoveNullable` in the following section because Java does not support to annotate generic type arguments.
- switch (type.GenericTypeArguments.Length)
+ if (type.GenericTypeArguments.Length >= 1)
{
- case 1:
- return $"{ResolveType(type.GenericTypeArguments.Single()).RemoveNullable()}{GetOrAddTypeDefinition(type)}";
- case 2:
- return $"{ResolveType(type.GenericTypeArguments.First()).RemoveNullable()}{ResolveType(type.GenericTypeArguments.Last()).RemoveNullable()}{GetOrAddTypeDefinition(type)}";
+ return string.Join("", type.GenericTypeArguments.Select(t => ResolveType(t).RemoveNullable())) + GetOrAddTypeDefinition(type);
}
if (type.GetGenericArguments() is not [var genericTypeArgumentDefinition])
diff --git a/src/src/main/java/com/relewise/client/Recommender.java b/src/src/main/java/com/relewise/client/Recommender.java
index 2aff76c0..6071e477 100644
--- a/src/src/main/java/com/relewise/client/Recommender.java
+++ b/src/src/main/java/com/relewise/client/Recommender.java
@@ -113,6 +113,10 @@ public BrandRecommendationResponse recommend(PersonalBrandRecommendationRequest
return makeRequestAndValidate("PersonalBrandRecommendationRequest", request, BrandRecommendationResponse.class);
}
+ public BrandRecommendationResponse recommend(BrandRecommendationRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("BrandRecommendationRequest", request, BrandRecommendationResponse.class);
+ }
+
public ProductRecommendationResponseCollection recommend(ProductRecommendationRequestCollection request) throws IOException, InterruptedException, ClientException {
return makeRequestAndValidate("ProductRecommendationRequestCollection", request, ProductRecommendationResponseCollection.class);
}
diff --git a/src/src/main/java/com/relewise/client/SearchAdministrator.java b/src/src/main/java/com/relewise/client/SearchAdministrator.java
index be2f3e5f..54286f2d 100644
--- a/src/src/main/java/com/relewise/client/SearchAdministrator.java
+++ b/src/src/main/java/com/relewise/client/SearchAdministrator.java
@@ -72,4 +72,28 @@ public SaveStemmingRulesResponse save(SaveStemmingRulesRequest request) throws I
public DeleteSearchRulesResponse delete(DeleteStemmingRulesRequest request) throws IOException, InterruptedException, ClientException {
return makeRequestAndValidate("DeleteStemmingRulesRequest", request, DeleteSearchRulesResponse.class);
}
+
+ public SearchTermModifierRulesResponse load(SearchTermModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("SearchTermModifierRulesRequest", request, SearchTermModifierRulesResponse.class);
+ }
+
+ public SaveSearchTermModifierRulesResponse save(SaveSearchTermModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("SaveSearchTermModifierRulesRequest", request, SaveSearchTermModifierRulesResponse.class);
+ }
+
+ public DeleteSearchRulesResponse delete(DeleteSearchTermModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("DeleteSearchTermModifierRulesRequest", request, DeleteSearchRulesResponse.class);
+ }
+
+ public SearchResultModifierRulesResponse load(SearchResultModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("SearchResultModifierRulesRequest", request, SearchResultModifierRulesResponse.class);
+ }
+
+ public SaveSearchResultModifierRulesResponse save(SaveSearchResultModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("SaveSearchResultModifierRulesRequest", request, SaveSearchResultModifierRulesResponse.class);
+ }
+
+ public DeleteSearchRulesResponse delete(DeleteSearchResultModifierRulesRequest request) throws IOException, InterruptedException, ClientException {
+ return makeRequestAndValidate("DeleteSearchResultModifierRulesRequest", request, DeleteSearchRulesResponse.class);
+ }
}
diff --git a/src/src/main/java/com/relewise/client/Tracker.java b/src/src/main/java/com/relewise/client/Tracker.java
index 66485bf3..5608e75f 100644
--- a/src/src/main/java/com/relewise/client/Tracker.java
+++ b/src/src/main/java/com/relewise/client/Tracker.java
@@ -29,6 +29,14 @@ public void track(TrackCartRequest trackingRequest) throws IOException, Interrup
makeRequestAndValidate("TrackCartRequest", trackingRequest, Void.class);
}
+ public void track(TrackCompanyAdministrativeActionRequest trackingRequest) throws IOException, InterruptedException, ClientException {
+ makeRequestAndValidate("TrackCompanyAdministrativeActionRequest", trackingRequest, Void.class);
+ }
+
+ public void track(TrackCompanyUpdateRequest trackingRequest) throws IOException, InterruptedException, ClientException {
+ makeRequestAndValidate("TrackCompanyUpdateRequest", trackingRequest, Void.class);
+ }
+
public void track(TrackContentAdministrativeActionRequest trackingRequest) throws IOException, InterruptedException, ClientException {
makeRequestAndValidate("TrackContentAdministrativeActionRequest", trackingRequest, Void.class);
}
diff --git a/src/src/main/java/com/relewise/client/model/AbandonedContentSearch.java b/src/src/main/java/com/relewise/client/model/AbandonedContentSearch.java
index 7b3117da..914dc2a7 100644
--- a/src/src/main/java/com/relewise/client/model/AbandonedContentSearch.java
+++ b/src/src/main/java/com/relewise/client/model/AbandonedContentSearch.java
@@ -65,4 +65,10 @@ public AbandonedContentSearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ @Override
+ public AbandonedContentSearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/AbandonedProductCategorySearch.java b/src/src/main/java/com/relewise/client/model/AbandonedProductCategorySearch.java
index 93a626b4..11f49320 100644
--- a/src/src/main/java/com/relewise/client/model/AbandonedProductCategorySearch.java
+++ b/src/src/main/java/com/relewise/client/model/AbandonedProductCategorySearch.java
@@ -65,4 +65,10 @@ public AbandonedProductCategorySearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ @Override
+ public AbandonedProductCategorySearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/AbandonedProductSearch.java b/src/src/main/java/com/relewise/client/model/AbandonedProductSearch.java
index 27b192d1..63dbf6eb 100644
--- a/src/src/main/java/com/relewise/client/model/AbandonedProductSearch.java
+++ b/src/src/main/java/com/relewise/client/model/AbandonedProductSearch.java
@@ -65,4 +65,10 @@ public AbandonedProductSearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ @Override
+ public AbandonedProductSearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/AbandonedSearch.java b/src/src/main/java/com/relewise/client/model/AbandonedSearch.java
index 85274e4e..657af173 100644
--- a/src/src/main/java/com/relewise/client/model/AbandonedSearch.java
+++ b/src/src/main/java/com/relewise/client/model/AbandonedSearch.java
@@ -32,6 +32,7 @@ public abstract class AbandonedSearch
public String $type = "";
public String loweredSearchTerm;
public Integer hits;
+ public @Nullable Language language;
public String getLoweredSearchTerm()
{
return this.loweredSearchTerm;
@@ -40,6 +41,10 @@ public Integer getHits()
{
return this.hits;
}
+ public @Nullable Language getLanguage()
+ {
+ return this.language;
+ }
public AbandonedSearch setLoweredSearchTerm(String loweredSearchTerm)
{
this.loweredSearchTerm = loweredSearchTerm;
@@ -50,4 +55,9 @@ public AbandonedSearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ public AbandonedSearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/AbandonedSearchTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/AbandonedSearchTriggerConfiguration.java
index 977ee722..88ddadbe 100644
--- a/src/src/main/java/com/relewise/client/model/AbandonedSearchTriggerConfiguration.java
+++ b/src/src/main/java/com/relewise/client/model/AbandonedSearchTriggerConfiguration.java
@@ -28,6 +28,8 @@ public class AbandonedSearchTriggerConfiguration extends AbandonedSearchTriggerR
public String $type = "Relewise.Client.DataTypes.Triggers.Configurations.AbandonedSearchTriggerConfiguration, Relewise.Client";
public SearchType[] searchTypesInPrioritizedOrder;
public @Nullable SearchTermCondition searchTermCondition;
+ public Boolean suppressOnEntityFromSearchResultViewed;
+ public Integer considerAbandonedAfterMinutes;
public static AbandonedSearchTriggerConfiguration create(String name, String description, SearchType... searchTypesInPrioritizedOrder)
{
return new AbandonedSearchTriggerConfiguration(name, description, searchTypesInPrioritizedOrder);
@@ -38,21 +40,24 @@ public AbandonedSearchTriggerConfiguration(String name, String description, Sear
this.description = description;
this.searchTypesInPrioritizedOrder = searchTypesInPrioritizedOrder;
this.searchTermCondition = null;
+ this.suppressOnEntityFromSearchResultViewed = true;
}
- public static AbandonedSearchTriggerConfiguration create(String name, String description, SearchType[] searchTypesInPrioritizedOrder, SearchTermCondition searchTermCondition)
+ public static AbandonedSearchTriggerConfiguration create(String name, String description, SearchType[] searchTypesInPrioritizedOrder, @Nullable SearchTermCondition searchTermCondition, Boolean suppressOnEntityFromSearchResultViewed)
{
- return new AbandonedSearchTriggerConfiguration(name, description, searchTypesInPrioritizedOrder, searchTermCondition);
+ return new AbandonedSearchTriggerConfiguration(name, description, searchTypesInPrioritizedOrder, searchTermCondition, suppressOnEntityFromSearchResultViewed);
}
- public AbandonedSearchTriggerConfiguration(String name, String description, SearchType[] searchTypesInPrioritizedOrder, SearchTermCondition searchTermCondition)
+ public AbandonedSearchTriggerConfiguration(String name, String description, SearchType[] searchTypesInPrioritizedOrder, @Nullable SearchTermCondition searchTermCondition, Boolean suppressOnEntityFromSearchResultViewed)
{
this.name = name;
this.description = description;
this.searchTypesInPrioritizedOrder = searchTypesInPrioritizedOrder;
this.searchTermCondition = searchTermCondition;
+ this.suppressOnEntityFromSearchResultViewed = suppressOnEntityFromSearchResultViewed;
}
public AbandonedSearchTriggerConfiguration()
{
this.searchTermCondition = null;
+ this.suppressOnEntityFromSearchResultViewed = true;
}
public SearchType[] getSearchTypesInPrioritizedOrder()
{
@@ -62,6 +67,14 @@ public SearchType[] getSearchTypesInPrioritizedOrder()
{
return this.searchTermCondition;
}
+ public Boolean getSuppressOnEntityFromSearchResultViewed()
+ {
+ return this.suppressOnEntityFromSearchResultViewed;
+ }
+ public Integer getConsiderAbandonedAfterMinutes()
+ {
+ return this.considerAbandonedAfterMinutes;
+ }
public AbandonedSearchTriggerConfiguration setSearchTypesInPrioritizedOrder(SearchType... searchTypesInPrioritizedOrder)
{
this.searchTypesInPrioritizedOrder = searchTypesInPrioritizedOrder;
@@ -86,6 +99,16 @@ public AbandonedSearchTriggerConfiguration setSearchTermCondition(SearchTermCond
this.searchTermCondition = searchTermCondition;
return this;
}
+ public AbandonedSearchTriggerConfiguration setSuppressOnEntityFromSearchResultViewed(Boolean suppressOnEntityFromSearchResultViewed)
+ {
+ this.suppressOnEntityFromSearchResultViewed = suppressOnEntityFromSearchResultViewed;
+ return this;
+ }
+ public AbandonedSearchTriggerConfiguration setConsiderAbandonedAfterMinutes(Integer considerAbandonedAfterMinutes)
+ {
+ this.considerAbandonedAfterMinutes = considerAbandonedAfterMinutes;
+ return this;
+ }
@Override
public AbandonedSearchTriggerConfiguration setId(UUID id)
{
diff --git a/src/src/main/java/com/relewise/client/model/Advertiser.java b/src/src/main/java/com/relewise/client/model/Advertiser.java
new file mode 100644
index 00000000..81600ea7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Advertiser.java
@@ -0,0 +1,98 @@
+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 = Advertiser.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Advertiser extends AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Advertiser, Relewise.Client";
+ public String name;
+ /** Defines what kind of promotions an advertiser is allowed to create, and constraints to what may be promoted. Constraints could as an example be all products belonging to the brand(s) this Advertiser is associated with. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public @Nullable PromotionSpecificationCollection allowedPromotions;
+ /** Defines locations/placements/variations where this advertiser is allowed to make promotions at. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public @Nullable PromotionLocationCollection allowedLocations;
+ public static Advertiser create(@Nullable UUID id, AdvertiserEntityState state, String name, @Nullable PromotionSpecificationCollection allowedPromotions, PromotionLocationCollection allowedLocations)
+ {
+ return new Advertiser(id, state, name, allowedPromotions, allowedLocations);
+ }
+ public Advertiser(@Nullable UUID id, AdvertiserEntityState state, String name, @Nullable PromotionSpecificationCollection allowedPromotions, PromotionLocationCollection allowedLocations)
+ {
+ this.id = id;
+ this.state = state;
+ this.name = name;
+ this.allowedPromotions = allowedPromotions;
+ this.allowedLocations = allowedLocations;
+ }
+ public Advertiser()
+ {
+ }
+ public String getName()
+ {
+ return this.name;
+ }
+ /** Defines what kind of promotions an advertiser is allowed to create, and constraints to what may be promoted. Constraints could as an example be all products belonging to the brand(s) this Advertiser is associated with. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public @Nullable PromotionSpecificationCollection getAllowedPromotions()
+ {
+ return this.allowedPromotions;
+ }
+ /** Defines locations/placements/variations where this advertiser is allowed to make promotions at. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public @Nullable PromotionLocationCollection getAllowedLocations()
+ {
+ return this.allowedLocations;
+ }
+ public Advertiser setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ /** Defines what kind of promotions an advertiser is allowed to create, and constraints to what may be promoted. Constraints could as an example be all products belonging to the brand(s) this Advertiser is associated with. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public Advertiser setAllowedPromotions(PromotionSpecificationCollection allowedPromotions)
+ {
+ this.allowedPromotions = allowedPromotions;
+ return this;
+ }
+ /** Defines locations/placements/variations where this advertiser is allowed to make promotions at. If null
or empty, an advertiser will not be allowed to make any promotions anywhere, only useful for Advertisers in draft. */
+ public Advertiser setAllowedLocations(PromotionLocationCollection allowedLocations)
+ {
+ this.allowedLocations = allowedLocations;
+ return this;
+ }
+ @Override
+ public Advertiser setState(AdvertiserEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ @Override
+ public Advertiser setMetadata(AdvertiserMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public Advertiser setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserAdvertiserEntityStateEntityResponse.java b/src/src/main/java/com/relewise/client/model/AdvertiserAdvertiserEntityStateEntityResponse.java
new file mode 100644
index 00000000..6119826d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserAdvertiserEntityStateEntityResponse.java
@@ -0,0 +1,75 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserAdvertiserEntityStateEntityResponse extends TimedResponse
+{
+ public String $type = "";
+ public Advertiser[] entities;
+ public Integer hits;
+ public HashMap hitsPerState;
+ public Advertiser[] getEntities()
+ {
+ return this.entities;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public HashMap getHitsPerState()
+ {
+ return this.hitsPerState;
+ }
+ public AdvertiserAdvertiserEntityStateEntityResponse setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public AdvertiserAdvertiserEntityStateEntityResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public AdvertiserAdvertiserEntityStateEntityResponse addToHitsPerState(AdvertiserEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ public AdvertiserAdvertiserEntityStateEntityResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public AdvertiserAdvertiserEntityStateEntityResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserEntityState.java b/src/src/main/java/com/relewise/client/model/AdvertiserEntityState.java
new file mode 100644
index 00000000..456dd285
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserEntityState.java
@@ -0,0 +1,37 @@
+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 enum AdvertiserEntityState
+{
+ Active {
+ public String toString() {
+ return "Active";
+ }
+ },
+ Inactive {
+ public String toString() {
+ return "Inactive";
+ }
+ },
+ Archived {
+ public String toString() {
+ return "Archived";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest.java
new file mode 100644
index 00000000..2664a959
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest.java
@@ -0,0 +1,70 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public @Nullable AdvertisersRequestEntityFilters filters;
+ public @Nullable AdvertisersRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public @Nullable AdvertisersRequestEntityFilters getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable AdvertisersRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest setFilters(AdvertisersRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest setSorting(AdvertisersRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity.java b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity.java
new file mode 100644
index 00000000..0c8a51ed
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity.java
@@ -0,0 +1,59 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity extends RetailMediaEntity
+{
+ public String $type = "";
+ public AdvertiserEntityState state;
+ /** Managed server side only, manually setting this will have no effect */
+ public AdvertiserMetadataValues metadata;
+ public AdvertiserEntityState getState()
+ {
+ return this.state;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public AdvertiserMetadataValues getMetadata()
+ {
+ return this.metadata;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity setState(AdvertiserEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity setMetadata(AdvertiserMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters.java b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters.java
new file mode 100644
index 00000000..69bddd28
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "";
+ public @Nullable String term;
+ public @Nullable AdvertiserEntityState[] states;
+ public @Nullable String getTerm()
+ {
+ return this.term;
+ }
+ public @Nullable AdvertiserEntityState[] getStates()
+ {
+ return this.states;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ public AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters setStates(AdvertiserEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserMetadataValues.java b/src/src/main/java/com/relewise/client/model/AdvertiserMetadataValues.java
new file mode 100644
index 00000000..171e25f7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserMetadataValues.java
@@ -0,0 +1,120 @@
+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 = AdvertiserMetadataValues.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AdvertiserMetadataValues extends MetadataValues
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Advertiser+MetadataValues, Relewise.Client";
+ public @Nullable OffsetDateTime inactivated;
+ public @Nullable String inactivatedBy;
+ public @Nullable OffsetDateTime activated;
+ public @Nullable String activatedBy;
+ public @Nullable OffsetDateTime archived;
+ public @Nullable String archivedBy;
+ public static AdvertiserMetadataValues create()
+ {
+ return new AdvertiserMetadataValues();
+ }
+ public AdvertiserMetadataValues()
+ {
+ }
+ public @Nullable OffsetDateTime getInactivated()
+ {
+ return this.inactivated;
+ }
+ public @Nullable String getInactivatedBy()
+ {
+ return this.inactivatedBy;
+ }
+ public @Nullable OffsetDateTime getActivated()
+ {
+ return this.activated;
+ }
+ public @Nullable String getActivatedBy()
+ {
+ return this.activatedBy;
+ }
+ public @Nullable OffsetDateTime getArchived()
+ {
+ return this.archived;
+ }
+ public @Nullable String getArchivedBy()
+ {
+ return this.archivedBy;
+ }
+ public AdvertiserMetadataValues setInactivated(@Nullable OffsetDateTime inactivated)
+ {
+ this.inactivated = inactivated;
+ return this;
+ }
+ public AdvertiserMetadataValues setInactivatedBy(String inactivatedBy)
+ {
+ this.inactivatedBy = inactivatedBy;
+ return this;
+ }
+ public AdvertiserMetadataValues setActivated(@Nullable OffsetDateTime activated)
+ {
+ this.activated = activated;
+ return this;
+ }
+ public AdvertiserMetadataValues setActivatedBy(String activatedBy)
+ {
+ this.activatedBy = activatedBy;
+ return this;
+ }
+ public AdvertiserMetadataValues setArchived(@Nullable OffsetDateTime archived)
+ {
+ this.archived = archived;
+ return this;
+ }
+ public AdvertiserMetadataValues setArchivedBy(String archivedBy)
+ {
+ this.archivedBy = archivedBy;
+ return this;
+ }
+ @Override
+ public AdvertiserMetadataValues setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public AdvertiserMetadataValues setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public AdvertiserMetadataValues setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public AdvertiserMetadataValues setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesRequest.java
new file mode 100644
index 00000000..50e96ed4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesRequest.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserSaveEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public Advertiser[] entities;
+ public String modifiedBy;
+ public Advertiser[] getEntities()
+ {
+ return this.entities;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public AdvertiserSaveEntitiesRequest setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public AdvertiserSaveEntitiesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesResponse.java b/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesResponse.java
new file mode 100644
index 00000000..71883d1b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertiserSaveEntitiesResponse.java
@@ -0,0 +1,46 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AdvertiserSaveEntitiesResponse extends TimedResponse
+{
+ public String $type = "";
+ public Advertiser[] entities;
+ public Advertiser[] getEntities()
+ {
+ return this.entities;
+ }
+ public AdvertiserSaveEntitiesResponse setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ @Override
+ public AdvertiserSaveEntitiesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertisersRequest.java b/src/src/main/java/com/relewise/client/model/AdvertisersRequest.java
new file mode 100644
index 00000000..8a76979d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertisersRequest.java
@@ -0,0 +1,67 @@
+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 = AdvertisersRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AdvertisersRequest extends AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.AdvertisersRequest, Relewise.Client";
+ public static AdvertisersRequest create(@Nullable AdvertisersRequestEntityFilters filters, @Nullable AdvertisersRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ return new AdvertisersRequest(filters, sorting, skip, take);
+ }
+ public AdvertisersRequest(@Nullable AdvertisersRequestEntityFilters filters, @Nullable AdvertisersRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ this.filters = filters;
+ this.sorting = sorting;
+ this.skip = skip;
+ this.take = take;
+ }
+ public AdvertisersRequest()
+ {
+ }
+ @Override
+ public AdvertisersRequest setFilters(AdvertisersRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public AdvertisersRequest setSorting(AdvertisersRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ @Override
+ public AdvertisersRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ @Override
+ public AdvertisersRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertisersRequestEntityFilters.java b/src/src/main/java/com/relewise/client/model/AdvertisersRequestEntityFilters.java
new file mode 100644
index 00000000..a2de7baa
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertisersRequestEntityFilters.java
@@ -0,0 +1,86 @@
+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 = AdvertisersRequestEntityFilters.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AdvertisersRequestEntityFilters extends AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.AdvertisersRequest+EntityFilters, Relewise.Client";
+ public @Nullable UUID[] ids;
+ public static AdvertisersRequestEntityFilters create()
+ {
+ return new AdvertisersRequestEntityFilters();
+ }
+ public AdvertisersRequestEntityFilters()
+ {
+ }
+ public @Nullable UUID[] getIds()
+ {
+ return this.ids;
+ }
+ public AdvertisersRequestEntityFilters setIds(UUID... ids)
+ {
+ this.ids = ids;
+ return this;
+ }
+ public AdvertisersRequestEntityFilters addToIds(UUID id)
+ {
+ if (this.ids == null)
+ {
+ this.ids = new UUID[] { id };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.ids));
+ existingList.add(id);
+ this.ids = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ @Override
+ public AdvertisersRequestEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ @Override
+ public AdvertisersRequestEntityFilters setStates(AdvertiserEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+ public AdvertisersRequestEntityFilters addToStates(AdvertiserEntityState state)
+ {
+ if (this.states == null)
+ {
+ this.states = new AdvertiserEntityState[] { state };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.states));
+ existingList.add(state);
+ this.states = existingList.toArray(new AdvertiserEntityState[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBy.java b/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBy.java
new file mode 100644
index 00000000..2460dd89
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBy.java
@@ -0,0 +1,37 @@
+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 enum AdvertisersRequestSortBy
+{
+ Created {
+ public String toString() {
+ return "Created";
+ }
+ },
+ Modified {
+ public String toString() {
+ return "Modified";
+ }
+ },
+ Name {
+ public String toString() {
+ return "Name";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBySorting.java b/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBySorting.java
new file mode 100644
index 00000000..66ad058c
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertisersRequestSortBySorting.java
@@ -0,0 +1,55 @@
+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 AdvertisersRequestSortBySorting
+{
+ public AdvertisersRequestSortBy sortBy;
+ public SortOrder sortOrder;
+ public static AdvertisersRequestSortBySorting create(AdvertisersRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ return new AdvertisersRequestSortBySorting(sortBy, sortOrder);
+ }
+ public AdvertisersRequestSortBySorting(AdvertisersRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ this.sortBy = sortBy;
+ this.sortOrder = sortOrder;
+ }
+ public AdvertisersRequestSortBySorting()
+ {
+ }
+ public AdvertisersRequestSortBy getSortBy()
+ {
+ return this.sortBy;
+ }
+ public SortOrder getSortOrder()
+ {
+ return this.sortOrder;
+ }
+ public AdvertisersRequestSortBySorting setSortBy(AdvertisersRequestSortBy sortBy)
+ {
+ this.sortBy = sortBy;
+ return this;
+ }
+ public AdvertisersRequestSortBySorting setSortOrder(SortOrder sortOrder)
+ {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AdvertisersResponse.java b/src/src/main/java/com/relewise/client/model/AdvertisersResponse.java
new file mode 100644
index 00000000..7d53f968
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/AdvertisersResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = AdvertisersResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AdvertisersResponse extends AdvertiserAdvertiserEntityStateEntityResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.AdvertisersResponse, Relewise.Client";
+ public static AdvertisersResponse create(Advertiser[] advertisers, Integer hits, HashMap hitsPerState)
+ {
+ return new AdvertisersResponse(advertisers, hits, hitsPerState);
+ }
+ public AdvertisersResponse(Advertiser[] advertisers, Integer hits, HashMap hitsPerState)
+ {
+ this.entities = advertisers;
+ this.hits = hits;
+ this.hitsPerState = hitsPerState;
+ }
+ public AdvertisersResponse()
+ {
+ }
+ @Override
+ public AdvertisersResponse setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public AdvertisersResponse addToEntities(Advertiser entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Advertiser[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Advertiser[0]);
+ }
+ return this;
+ }
+ @Override
+ public AdvertisersResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public AdvertisersResponse addToHitsPerState(AdvertiserEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ @Override
+ public AdvertisersResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public AdvertisersResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/AndFilter.java b/src/src/main/java/com/relewise/client/model/AndFilter.java
index 05023c07..cf564ef6 100644
--- a/src/src/main/java/com/relewise/client/model/AndFilter.java
+++ b/src/src/main/java/com/relewise/client/model/AndFilter.java
@@ -78,4 +78,10 @@ public AndFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public AndFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ApplyFilterSettings.java b/src/src/main/java/com/relewise/client/model/ApplyFilterSettings.java
new file mode 100644
index 00000000..68287a62
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ApplyFilterSettings.java
@@ -0,0 +1,50 @@
+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 = ApplyFilterSettings.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ApplyFilterSettings extends FilterScopeSettings
+{
+ public String $type = "Relewise.Client.Requests.Filters.Settings.ApplyFilterSettings, Relewise.Client";
+ public Boolean apply;
+ public static ApplyFilterSettings create(Boolean apply)
+ {
+ return new ApplyFilterSettings(apply);
+ }
+ public ApplyFilterSettings(Boolean apply)
+ {
+ this.apply = apply;
+ }
+ public ApplyFilterSettings()
+ {
+ }
+ public Boolean getApply()
+ {
+ return this.apply;
+ }
+ public ApplyFilterSettings setApply(Boolean apply)
+ {
+ this.apply = apply;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/BrandAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/BrandAssortmentFilter.java
index e5dd0692..bfe0e9ad 100644
--- a/src/src/main/java/com/relewise/client/model/BrandAssortmentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/BrandAssortmentFilter.java
@@ -67,4 +67,10 @@ public BrandAssortmentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public BrandAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/BrandDataFilter.java b/src/src/main/java/com/relewise/client/model/BrandDataFilter.java
index 3da3e666..e0aba4a3 100644
--- a/src/src/main/java/com/relewise/client/model/BrandDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/BrandDataFilter.java
@@ -150,4 +150,10 @@ public BrandDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public BrandDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/BrandDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/BrandDataHasKeyFilter.java
new file mode 100644
index 00000000..c9f67f0a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/BrandDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = BrandDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BrandDataHasKeyFilter extends Filter implements IBrandFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.BrandDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static BrandDataHasKeyFilter create(String key)
+ {
+ return new BrandDataHasKeyFilter(key);
+ }
+ public BrandDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static BrandDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new BrandDataHasKeyFilter(key, negated);
+ }
+ public BrandDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public BrandDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public BrandDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public BrandDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public BrandDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/BrandDisabledFilter.java b/src/src/main/java/com/relewise/client/model/BrandDisabledFilter.java
new file mode 100644
index 00000000..2659723e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/BrandDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = BrandDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BrandDisabledFilter extends Filter implements IBrandFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.BrandDisabledFilter, Relewise.Client";
+ public static BrandDisabledFilter create()
+ {
+ return new BrandDisabledFilter();
+ }
+ public BrandDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static BrandDisabledFilter create(Boolean negated)
+ {
+ return new BrandDisabledFilter(negated);
+ }
+ public BrandDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public BrandDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public BrandDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/BrandIdFilter.java b/src/src/main/java/com/relewise/client/model/BrandIdFilter.java
index bbf11569..d61945c9 100644
--- a/src/src/main/java/com/relewise/client/model/BrandIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/BrandIdFilter.java
@@ -67,4 +67,10 @@ public BrandIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public BrandIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java
index fe71ef9d..062c66d9 100644
--- a/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.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 a BrandId
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,8 +27,11 @@
public class BrandIdRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.BrandIdRelevanceModifier, Relewise.Client";
+ /** The Id of the Brand that this RelevanceModifier
will distinguish on. */
public String brandId;
+ /** The weight that the entity will be multiplied with if it matches the specific BrandId
. */
public Double ifProductIsBrandMultiplyWeightBy;
+ /** The weight that the entity will be multiplied with if it does not match the specific BrandId
. */
public Double ifProductIsNotBrandMultiplyWeightBy;
public static BrandIdRelevanceModifier create(String brandId)
{
@@ -39,12 +43,22 @@ public BrandIdRelevanceModifier(String brandId)
this.ifProductIsBrandMultiplyWeightBy = 1d;
this.ifProductIsNotBrandMultiplyWeightBy = 1d;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of an entity depending on a BrandId
.
+ * @param brandId The Id of the Brand that this RelevanceModifier will distinguish on.
+ * @param ifProductIsBrandMultiplyWeightBy The weight that the entity will be multiplied with if it matches the specific BrandId.
+ * @param ifProductIsNotBrandMultiplyWeightBy The weight that the entity will be multiplied with if it does not match the specific BrandId.
+ */
public static BrandIdRelevanceModifier create(String brandId, Double ifProductIsBrandMultiplyWeightBy, Double ifProductIsNotBrandMultiplyWeightBy)
{
return new BrandIdRelevanceModifier(brandId, ifProductIsBrandMultiplyWeightBy, ifProductIsNotBrandMultiplyWeightBy);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of an entity depending on a BrandId
.
+ * @param brandId The Id of the Brand that this RelevanceModifier will distinguish on.
+ * @param ifProductIsBrandMultiplyWeightBy The weight that the entity will be multiplied with if it matches the specific BrandId.
+ * @param ifProductIsNotBrandMultiplyWeightBy The weight that the entity will be multiplied with if it does not match the specific BrandId.
+ */
public BrandIdRelevanceModifier(String brandId, Double ifProductIsBrandMultiplyWeightBy, Double ifProductIsNotBrandMultiplyWeightBy)
{
this.brandId = brandId;
@@ -56,28 +70,34 @@ public BrandIdRelevanceModifier()
this.ifProductIsBrandMultiplyWeightBy = 1d;
this.ifProductIsNotBrandMultiplyWeightBy = 1d;
}
+ /** The Id of the Brand that this RelevanceModifier
will distinguish on. */
public String getBrandId()
{
return this.brandId;
}
+ /** The weight that the entity will be multiplied with if it matches the specific BrandId
. */
public Double getIfProductIsBrandMultiplyWeightBy()
{
return this.ifProductIsBrandMultiplyWeightBy;
}
+ /** The weight that the entity will be multiplied with if it does not match the specific BrandId
. */
public Double getIfProductIsNotBrandMultiplyWeightBy()
{
return this.ifProductIsNotBrandMultiplyWeightBy;
}
+ /** The Id of the Brand that this RelevanceModifier
will distinguish on. */
public BrandIdRelevanceModifier setBrandId(String brandId)
{
this.brandId = brandId;
return this;
}
+ /** The weight that the entity will be multiplied with if it matches the specific BrandId
. */
public BrandIdRelevanceModifier setIfProductIsBrandMultiplyWeightBy(Double ifProductIsBrandMultiplyWeightBy)
{
this.ifProductIsBrandMultiplyWeightBy = ifProductIsBrandMultiplyWeightBy;
return this;
}
+ /** The weight that the entity will be multiplied with if it does not match the specific BrandId
. */
public BrandIdRelevanceModifier setIfProductIsNotBrandMultiplyWeightBy(Double ifProductIsNotBrandMultiplyWeightBy)
{
this.ifProductIsNotBrandMultiplyWeightBy = ifProductIsNotBrandMultiplyWeightBy;
diff --git a/src/src/main/java/com/relewise/client/model/BrandRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/BrandRecommendationRequest.java
index eab05943..fcdef5c0 100644
--- a/src/src/main/java/com/relewise/client/model/BrandRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/BrandRecommendationRequest.java
@@ -75,4 +75,11 @@ public BrandRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public BrandRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/BrandRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/BrandRecommendationRequestSettings.java
index 23f585d9..6310f430 100644
--- a/src/src/main/java/com/relewise/client/model/BrandRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/BrandRecommendationRequestSettings.java
@@ -25,6 +25,7 @@ public class BrandRecommendationRequestSettings
public Boolean allowReplacingOfRecentlyShownRecommendations;
public Boolean prioritizeDiversityBetweenRequests;
public @Nullable SelectedBrandPropertiesSettings selectedBrandProperties;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static BrandRecommendationRequestSettings create()
{
return new BrandRecommendationRequestSettings();
@@ -52,6 +53,10 @@ public Boolean getPrioritizeDiversityBetweenRequests()
{
return this.selectedBrandProperties;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public BrandRecommendationRequestSettings setNumberOfRecommendations(Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -77,4 +82,9 @@ public BrandRecommendationRequestSettings setSelectedBrandProperties(SelectedBra
this.selectedBrandProperties = selectedBrandProperties;
return this;
}
+ public BrandRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/BrandView.java b/src/src/main/java/com/relewise/client/model/BrandView.java
index baf2c11e..6704dfd0 100644
--- a/src/src/main/java/com/relewise/client/model/BrandView.java
+++ b/src/src/main/java/com/relewise/client/model/BrandView.java
@@ -28,6 +28,8 @@ public class BrandView extends Trackable implements IUserIdentifier
public String $type = "Relewise.Client.DataTypes.BrandView, Relewise.Client";
public @Nullable User user;
public Brand brand;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static BrandView create(@Nullable User user, Brand brand)
{
return new BrandView(user, brand);
@@ -48,6 +50,11 @@ public Brand getBrand()
{
return this.brand;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public BrandView setUser(User user)
{
this.user = user;
@@ -58,4 +65,10 @@ public BrandView setBrand(Brand brand)
this.brand = brand;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public BrandView setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/Budget.java b/src/src/main/java/com/relewise/client/model/Budget.java
new file mode 100644
index 00000000..4bc4d442
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Budget.java
@@ -0,0 +1,51 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = CPMBudget.class, name = "Relewise.Client.DataTypes.RetailMedia.CPMBudget, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class Budget
+{
+ public String $type = "";
+ public @Nullable Double maxTotalCost;
+ public Double totalCost;
+ public @Nullable Double getMaxTotalCost()
+ {
+ return this.maxTotalCost;
+ }
+ public Double getTotalCost()
+ {
+ return this.totalCost;
+ }
+ public Budget setMaxTotalCost(@Nullable Double maxTotalCost)
+ {
+ this.maxTotalCost = maxTotalCost;
+ return this;
+ }
+ public Budget setTotalCost(Double totalCost)
+ {
+ this.totalCost = totalCost;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CPMBudget.java b/src/src/main/java/com/relewise/client/model/CPMBudget.java
new file mode 100644
index 00000000..9e30df2f
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CPMBudget.java
@@ -0,0 +1,63 @@
+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 = CPMBudget.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CPMBudget extends Budget
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.CPMBudget, Relewise.Client";
+ public Double costPerMille;
+ public static CPMBudget create(Double costPerMille, @Nullable Double maxTotalCost)
+ {
+ return new CPMBudget(costPerMille, maxTotalCost);
+ }
+ public CPMBudget(Double costPerMille, @Nullable Double maxTotalCost)
+ {
+ this.costPerMille = costPerMille;
+ this.maxTotalCost = maxTotalCost;
+ }
+ public CPMBudget()
+ {
+ }
+ public Double getCostPerMille()
+ {
+ return this.costPerMille;
+ }
+ public CPMBudget setCostPerMille(Double costPerMille)
+ {
+ this.costPerMille = costPerMille;
+ return this;
+ }
+ @Override
+ public CPMBudget setMaxTotalCost(@Nullable Double maxTotalCost)
+ {
+ this.maxTotalCost = maxTotalCost;
+ return this;
+ }
+ @Override
+ public CPMBudget setTotalCost(Double totalCost)
+ {
+ this.totalCost = totalCost;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Campaign.java b/src/src/main/java/com/relewise/client/model/Campaign.java
new file mode 100644
index 00000000..7b0f99c9
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Campaign.java
@@ -0,0 +1,124 @@
+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 = Campaign.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Campaign extends CampaignEntityStateCampaignMetadataValuesRetailMediaEntity
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Campaign, Relewise.Client";
+ public String name;
+ public @Nullable ISchedule schedule;
+ public PromotionCollection promotions;
+ public UUID advertiserId;
+ public Budget budget;
+ public CampaignStatusWithHistory status;
+ public static Campaign create(@Nullable UUID id, CampaignEntityState state, String name, UUID advertiserId, Budget budget, @Nullable ISchedule schedule, PromotionCollection promotions)
+ {
+ return new Campaign(id, state, name, advertiserId, budget, schedule, promotions);
+ }
+ public Campaign(@Nullable UUID id, CampaignEntityState state, String name, UUID advertiserId, Budget budget, @Nullable ISchedule schedule, PromotionCollection promotions)
+ {
+ this.id = id;
+ this.state = state;
+ this.name = name;
+ this.advertiserId = advertiserId;
+ this.budget = budget;
+ this.schedule = schedule;
+ this.promotions = promotions;
+ }
+ public Campaign()
+ {
+ }
+ public String getName()
+ {
+ return this.name;
+ }
+ public @Nullable ISchedule getSchedule()
+ {
+ return this.schedule;
+ }
+ public PromotionCollection getPromotions()
+ {
+ return this.promotions;
+ }
+ public UUID getAdvertiserId()
+ {
+ return this.advertiserId;
+ }
+ public Budget getBudget()
+ {
+ return this.budget;
+ }
+ public CampaignStatusWithHistory getStatus()
+ {
+ return this.status;
+ }
+ public Campaign setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ public Campaign setSchedule(ISchedule schedule)
+ {
+ this.schedule = schedule;
+ return this;
+ }
+ public Campaign setPromotions(PromotionCollection promotions)
+ {
+ this.promotions = promotions;
+ return this;
+ }
+ public Campaign setAdvertiserId(UUID advertiserId)
+ {
+ this.advertiserId = advertiserId;
+ return this;
+ }
+ public Campaign setBudget(Budget budget)
+ {
+ this.budget = budget;
+ return this;
+ }
+ public Campaign setStatus(CampaignStatusWithHistory status)
+ {
+ this.status = status;
+ return this;
+ }
+ @Override
+ public Campaign setState(CampaignEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ @Override
+ public Campaign setMetadata(CampaignMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public Campaign setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalytics.java b/src/src/main/java/com/relewise/client/model/CampaignAnalytics.java
new file mode 100644
index 00000000..dc5f7a9e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalytics.java
@@ -0,0 +1,44 @@
+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 CampaignAnalytics
+{
+ public CampaignAnalyticsProductAnalytics products;
+ public static CampaignAnalytics create(CampaignAnalyticsProductAnalytics products)
+ {
+ return new CampaignAnalytics(products);
+ }
+ public CampaignAnalytics(CampaignAnalyticsProductAnalytics products)
+ {
+ this.products = products;
+ }
+ public CampaignAnalytics()
+ {
+ }
+ public CampaignAnalyticsProductAnalytics getProducts()
+ {
+ return this.products;
+ }
+ public CampaignAnalytics setProducts(CampaignAnalyticsProductAnalytics products)
+ {
+ this.products = products;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalytics.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalytics.java
new file mode 100644
index 00000000..ea42f3cd
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalytics.java
@@ -0,0 +1,102 @@
+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;
+
+/** Defines how campaign performs. */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignAnalyticsProductAnalytics
+{
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics[] timeSeries;
+ /** Number of times products are being promoted by the Campaign
. */
+ public Integer promotions;
+ /** How many times each individual product was promoted. */
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics[] promotedProducts;
+ public static CampaignAnalyticsProductAnalytics create(CampaignAnalyticsProductAnalyticsPeriodMetrics[] timeSeries, Integer promotions, CampaignAnalyticsProductAnalyticsPromotedProductMetrics... promotedProducts)
+ {
+ return new CampaignAnalyticsProductAnalytics(timeSeries, promotions, promotedProducts);
+ }
+ public CampaignAnalyticsProductAnalytics(CampaignAnalyticsProductAnalyticsPeriodMetrics[] timeSeries, Integer promotions, CampaignAnalyticsProductAnalyticsPromotedProductMetrics... promotedProducts)
+ {
+ this.timeSeries = timeSeries;
+ this.promotions = promotions;
+ this.promotedProducts = promotedProducts;
+ }
+ public CampaignAnalyticsProductAnalytics()
+ {
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics[] getTimeSeries()
+ {
+ return this.timeSeries;
+ }
+ /** Number of times products are being promoted by the Campaign
. */
+ public Integer getPromotions()
+ {
+ return this.promotions;
+ }
+ /** How many times each individual product was promoted. */
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics[] getPromotedProducts()
+ {
+ return this.promotedProducts;
+ }
+ public CampaignAnalyticsProductAnalytics setTimeSeries(CampaignAnalyticsProductAnalyticsPeriodMetrics... timeSeries)
+ {
+ this.timeSeries = timeSeries;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalytics addToTimeSeries(CampaignAnalyticsProductAnalyticsPeriodMetrics timeSery)
+ {
+ if (this.timeSeries == null)
+ {
+ this.timeSeries = new CampaignAnalyticsProductAnalyticsPeriodMetrics[] { timeSery };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.timeSeries));
+ existingList.add(timeSery);
+ this.timeSeries = existingList.toArray(new CampaignAnalyticsProductAnalyticsPeriodMetrics[0]);
+ }
+ return this;
+ }
+ /** Number of times products are being promoted by the Campaign
. */
+ public CampaignAnalyticsProductAnalytics setPromotions(Integer promotions)
+ {
+ this.promotions = promotions;
+ return this;
+ }
+ /** How many times each individual product was promoted. */
+ public CampaignAnalyticsProductAnalytics setPromotedProducts(CampaignAnalyticsProductAnalyticsPromotedProductMetrics... promotedProducts)
+ {
+ this.promotedProducts = promotedProducts;
+ return this;
+ }
+ /** How many times each individual product was promoted. */
+ public CampaignAnalyticsProductAnalytics addToPromotedProducts(CampaignAnalyticsProductAnalyticsPromotedProductMetrics promotedProduct)
+ {
+ if (this.promotedProducts == null)
+ {
+ this.promotedProducts = new CampaignAnalyticsProductAnalyticsPromotedProductMetrics[] { promotedProduct };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.promotedProducts));
+ existingList.add(promotedProduct);
+ this.promotedProducts = existingList.toArray(new CampaignAnalyticsProductAnalyticsPromotedProductMetrics[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetrics.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetrics.java
new file mode 100644
index 00000000..97cf076d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetrics.java
@@ -0,0 +1,91 @@
+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 CampaignAnalyticsProductAnalyticsPeriodMetrics
+{
+ public OffsetDateTime periodFromUtc;
+ public Integer views;
+ public Integer salesQuantity;
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics[] currencies;
+ public static CampaignAnalyticsProductAnalyticsPeriodMetrics create(OffsetDateTime periodFromUtc, Integer views, Integer salesQuantity, CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics... currencies)
+ {
+ return new CampaignAnalyticsProductAnalyticsPeriodMetrics(periodFromUtc, views, salesQuantity, currencies);
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics(OffsetDateTime periodFromUtc, Integer views, Integer salesQuantity, CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics... currencies)
+ {
+ this.periodFromUtc = periodFromUtc;
+ this.views = views;
+ this.salesQuantity = salesQuantity;
+ this.currencies = currencies;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics()
+ {
+ }
+ public OffsetDateTime getPeriodFromUtc()
+ {
+ return this.periodFromUtc;
+ }
+ public Integer getViews()
+ {
+ return this.views;
+ }
+ public Integer getSalesQuantity()
+ {
+ return this.salesQuantity;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics[] getCurrencies()
+ {
+ return this.currencies;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics setPeriodFromUtc(OffsetDateTime periodFromUtc)
+ {
+ this.periodFromUtc = periodFromUtc;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics setViews(Integer views)
+ {
+ this.views = views;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics setSalesQuantity(Integer salesQuantity)
+ {
+ this.salesQuantity = salesQuantity;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics setCurrencies(CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics... currencies)
+ {
+ this.currencies = currencies;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetrics addToCurrencies(CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics currency)
+ {
+ if (this.currencies == null)
+ {
+ this.currencies = new CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics[] { currency };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.currencies));
+ existingList.add(currency);
+ this.currencies = existingList.toArray(new CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics.java
new file mode 100644
index 00000000..a52fb9cd
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics.java
@@ -0,0 +1,55 @@
+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 CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics
+{
+ public String currency;
+ public Double revenue;
+ public static CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics create(String currency, Double revenue)
+ {
+ return new CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics(currency, revenue);
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics(String currency, Double revenue)
+ {
+ this.currency = currency;
+ this.revenue = revenue;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics()
+ {
+ }
+ public String getCurrency()
+ {
+ return this.currency;
+ }
+ public Double getRevenue()
+ {
+ return this.revenue;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics setCurrency(String currency)
+ {
+ this.currency = currency;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics setRevenue(Double revenue)
+ {
+ this.revenue = revenue;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPromotedProductMetrics.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPromotedProductMetrics.java
new file mode 100644
index 00000000..b3f91958
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsProductAnalyticsPromotedProductMetrics.java
@@ -0,0 +1,55 @@
+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 CampaignAnalyticsProductAnalyticsPromotedProductMetrics
+{
+ public String productId;
+ public Integer promotions;
+ public static CampaignAnalyticsProductAnalyticsPromotedProductMetrics create(String productId, Integer promotions)
+ {
+ return new CampaignAnalyticsProductAnalyticsPromotedProductMetrics(productId, promotions);
+ }
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics(String productId, Integer promotions)
+ {
+ this.productId = productId;
+ this.promotions = promotions;
+ }
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics()
+ {
+ }
+ public String getProductId()
+ {
+ return this.productId;
+ }
+ public Integer getPromotions()
+ {
+ return this.promotions;
+ }
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics setProductId(String productId)
+ {
+ this.productId = productId;
+ return this;
+ }
+ public CampaignAnalyticsProductAnalyticsPromotedProductMetrics setPromotions(Integer promotions)
+ {
+ this.promotions = promotions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsRequest.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsRequest.java
new file mode 100644
index 00000000..92c8ef53
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsRequest.java
@@ -0,0 +1,76 @@
+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;
+
+/** Analytics data request for campaign Id
during PeriodUtc
. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = CampaignAnalyticsRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignAnalyticsRequest extends LicensedRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.CampaignAnalyticsRequest, Relewise.Client";
+ /** The campaign to provide analytics for. */
+ public UUID id;
+ public LocalDateTimeRange periodUtc;
+ public @Nullable FilterCollection filters;
+ public static CampaignAnalyticsRequest create(UUID id, LocalDateTimeRange periodUtc, FilterCollection filters)
+ {
+ return new CampaignAnalyticsRequest(id, periodUtc, filters);
+ }
+ public CampaignAnalyticsRequest(UUID id, LocalDateTimeRange periodUtc, FilterCollection filters)
+ {
+ this.id = id;
+ this.periodUtc = periodUtc;
+ this.filters = filters;
+ }
+ public CampaignAnalyticsRequest()
+ {
+ }
+ /** The campaign to provide analytics for. */
+ public UUID getId()
+ {
+ return this.id;
+ }
+ public LocalDateTimeRange getPeriodUtc()
+ {
+ return this.periodUtc;
+ }
+ public @Nullable FilterCollection getFilters()
+ {
+ return this.filters;
+ }
+ /** The campaign to provide analytics for. */
+ public CampaignAnalyticsRequest setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ public CampaignAnalyticsRequest setPeriodUtc(LocalDateTimeRange periodUtc)
+ {
+ this.periodUtc = periodUtc;
+ return this;
+ }
+ public CampaignAnalyticsRequest setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignAnalyticsResponse.java b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsResponse.java
new file mode 100644
index 00000000..a8616df6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignAnalyticsResponse.java
@@ -0,0 +1,56 @@
+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 = CampaignAnalyticsResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignAnalyticsResponse extends TimedResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.CampaignAnalyticsResponse, Relewise.Client";
+ public CampaignAnalytics analytics;
+ public static CampaignAnalyticsResponse create(CampaignAnalytics analytics)
+ {
+ return new CampaignAnalyticsResponse(analytics);
+ }
+ public CampaignAnalyticsResponse(CampaignAnalytics analytics)
+ {
+ this.analytics = analytics;
+ }
+ public CampaignAnalyticsResponse()
+ {
+ }
+ public CampaignAnalytics getAnalytics()
+ {
+ return this.analytics;
+ }
+ public CampaignAnalyticsResponse setAnalytics(CampaignAnalytics analytics)
+ {
+ this.analytics = analytics;
+ return this;
+ }
+ @Override
+ public CampaignAnalyticsResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignCampaignEntityStateEntityResponse.java b/src/src/main/java/com/relewise/client/model/CampaignCampaignEntityStateEntityResponse.java
new file mode 100644
index 00000000..f4be94cc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignCampaignEntityStateEntityResponse.java
@@ -0,0 +1,75 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignCampaignEntityStateEntityResponse extends TimedResponse
+{
+ public String $type = "";
+ public Campaign[] entities;
+ public Integer hits;
+ public HashMap hitsPerState;
+ public Campaign[] getEntities()
+ {
+ return this.entities;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public HashMap getHitsPerState()
+ {
+ return this.hitsPerState;
+ }
+ public CampaignCampaignEntityStateEntityResponse setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public CampaignCampaignEntityStateEntityResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public CampaignCampaignEntityStateEntityResponse addToHitsPerState(CampaignEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ public CampaignCampaignEntityStateEntityResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public CampaignCampaignEntityStateEntityResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignEntityState.java b/src/src/main/java/com/relewise/client/model/CampaignEntityState.java
new file mode 100644
index 00000000..60eb24b0
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignEntityState.java
@@ -0,0 +1,37 @@
+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 enum CampaignEntityState
+{
+ Proposed {
+ public String toString() {
+ return "Proposed";
+ }
+ },
+ Approved {
+ public String toString() {
+ return "Approved";
+ }
+ },
+ Archived {
+ public String toString() {
+ return "Archived";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest.java
new file mode 100644
index 00000000..c507a0c5
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest.java
@@ -0,0 +1,70 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public @Nullable CampaignsRequestEntityFilters filters;
+ public @Nullable CampaignsRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public @Nullable CampaignsRequestEntityFilters getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable CampaignsRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest setFilters(CampaignsRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest setSorting(CampaignsRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntity.java b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntity.java
new file mode 100644
index 00000000..7f352ab2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntity.java
@@ -0,0 +1,59 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignEntityStateCampaignMetadataValuesRetailMediaEntity extends RetailMediaEntity
+{
+ public String $type = "";
+ public CampaignEntityState state;
+ /** Managed server side only, manually setting this will have no effect */
+ public CampaignMetadataValues metadata;
+ public CampaignEntityState getState()
+ {
+ return this.state;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public CampaignMetadataValues getMetadata()
+ {
+ return this.metadata;
+ }
+ public CampaignEntityStateCampaignMetadataValuesRetailMediaEntity setState(CampaignEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public CampaignEntityStateCampaignMetadataValuesRetailMediaEntity setMetadata(CampaignMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public CampaignEntityStateCampaignMetadataValuesRetailMediaEntity setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters.java b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters.java
new file mode 100644
index 00000000..ee3b85dc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "";
+ public @Nullable String term;
+ public @Nullable CampaignEntityState[] states;
+ public @Nullable String getTerm()
+ {
+ return this.term;
+ }
+ public @Nullable CampaignEntityState[] getStates()
+ {
+ return this.states;
+ }
+ public CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ public CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters setStates(CampaignEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignMetadataValues.java b/src/src/main/java/com/relewise/client/model/CampaignMetadataValues.java
new file mode 100644
index 00000000..910e9ad6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignMetadataValues.java
@@ -0,0 +1,120 @@
+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 = CampaignMetadataValues.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignMetadataValues extends MetadataValues
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Campaign+MetadataValues, Relewise.Client";
+ public @Nullable OffsetDateTime proposed;
+ public @Nullable String proposedBy;
+ public @Nullable OffsetDateTime approved;
+ public @Nullable String approvedBy;
+ public @Nullable OffsetDateTime archived;
+ public @Nullable String archivedBy;
+ public static CampaignMetadataValues create()
+ {
+ return new CampaignMetadataValues();
+ }
+ public CampaignMetadataValues()
+ {
+ }
+ public @Nullable OffsetDateTime getProposed()
+ {
+ return this.proposed;
+ }
+ public @Nullable String getProposedBy()
+ {
+ return this.proposedBy;
+ }
+ public @Nullable OffsetDateTime getApproved()
+ {
+ return this.approved;
+ }
+ public @Nullable String getApprovedBy()
+ {
+ return this.approvedBy;
+ }
+ public @Nullable OffsetDateTime getArchived()
+ {
+ return this.archived;
+ }
+ public @Nullable String getArchivedBy()
+ {
+ return this.archivedBy;
+ }
+ public CampaignMetadataValues setProposed(@Nullable OffsetDateTime proposed)
+ {
+ this.proposed = proposed;
+ return this;
+ }
+ public CampaignMetadataValues setProposedBy(String proposedBy)
+ {
+ this.proposedBy = proposedBy;
+ return this;
+ }
+ public CampaignMetadataValues setApproved(@Nullable OffsetDateTime approved)
+ {
+ this.approved = approved;
+ return this;
+ }
+ public CampaignMetadataValues setApprovedBy(String approvedBy)
+ {
+ this.approvedBy = approvedBy;
+ return this;
+ }
+ public CampaignMetadataValues setArchived(@Nullable OffsetDateTime archived)
+ {
+ this.archived = archived;
+ return this;
+ }
+ public CampaignMetadataValues setArchivedBy(String archivedBy)
+ {
+ this.archivedBy = archivedBy;
+ return this;
+ }
+ @Override
+ public CampaignMetadataValues setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public CampaignMetadataValues setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public CampaignMetadataValues setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public CampaignMetadataValues setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesRequest.java
new file mode 100644
index 00000000..e24f88d6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesRequest.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignSaveEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public Campaign[] entities;
+ public String modifiedBy;
+ public Campaign[] getEntities()
+ {
+ return this.entities;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public CampaignSaveEntitiesRequest setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public CampaignSaveEntitiesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesResponse.java b/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesResponse.java
new file mode 100644
index 00000000..e76889c3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignSaveEntitiesResponse.java
@@ -0,0 +1,46 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CampaignSaveEntitiesResponse extends TimedResponse
+{
+ public String $type = "";
+ public Campaign[] entities;
+ public Campaign[] getEntities()
+ {
+ return this.entities;
+ }
+ public CampaignSaveEntitiesResponse setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ @Override
+ public CampaignSaveEntitiesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistory.java b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistory.java
new file mode 100644
index 00000000..486afbad
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistory.java
@@ -0,0 +1,64 @@
+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 CampaignStatusWithHistory
+{
+ public CampaignStatusWithHistoryStatusName current;
+ public ArrayList history;
+ public static CampaignStatusWithHistory create(CampaignStatusWithHistoryStatusName current, CampaignStatusWithHistoryChange... history)
+ {
+ return new CampaignStatusWithHistory(current, history);
+ }
+ public CampaignStatusWithHistory(CampaignStatusWithHistoryStatusName current, CampaignStatusWithHistoryChange... history)
+ {
+ this.current = current;
+ this.history = new ArrayList<>(Arrays.asList(history));
+ }
+ public CampaignStatusWithHistory()
+ {
+ }
+ public CampaignStatusWithHistoryStatusName getCurrent()
+ {
+ return this.current;
+ }
+ public ArrayList getHistory()
+ {
+ return this.history;
+ }
+ public CampaignStatusWithHistory setCurrent(CampaignStatusWithHistoryStatusName current)
+ {
+ this.current = current;
+ return this;
+ }
+ public CampaignStatusWithHistory setHistory(CampaignStatusWithHistoryChange... history)
+ {
+ this.history = new ArrayList<>(Arrays.asList(history));;
+ return this;
+ }
+ public CampaignStatusWithHistory addToHistory(CampaignStatusWithHistoryChange history)
+ {
+ if (this.history == null)
+ {
+ this.history = new ArrayList<>();
+ }
+ this.history.add(history);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryChange.java b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryChange.java
new file mode 100644
index 00000000..8d8afa33
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryChange.java
@@ -0,0 +1,55 @@
+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 CampaignStatusWithHistoryChange
+{
+ public OffsetDateTime utcTime;
+ public CampaignStatusWithHistoryStatusName status;
+ public static CampaignStatusWithHistoryChange create(OffsetDateTime utcTime, CampaignStatusWithHistoryStatusName status)
+ {
+ return new CampaignStatusWithHistoryChange(utcTime, status);
+ }
+ public CampaignStatusWithHistoryChange(OffsetDateTime utcTime, CampaignStatusWithHistoryStatusName status)
+ {
+ this.utcTime = utcTime;
+ this.status = status;
+ }
+ public CampaignStatusWithHistoryChange()
+ {
+ }
+ public OffsetDateTime getUtcTime()
+ {
+ return this.utcTime;
+ }
+ public CampaignStatusWithHistoryStatusName getStatus()
+ {
+ return this.status;
+ }
+ public CampaignStatusWithHistoryChange setUtcTime(OffsetDateTime utcTime)
+ {
+ this.utcTime = utcTime;
+ return this;
+ }
+ public CampaignStatusWithHistoryChange setStatus(CampaignStatusWithHistoryStatusName status)
+ {
+ this.status = status;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryStatusName.java b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryStatusName.java
new file mode 100644
index 00000000..18abb446
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignStatusWithHistoryStatusName.java
@@ -0,0 +1,42 @@
+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 enum CampaignStatusWithHistoryStatusName
+{
+ Active {
+ public String toString() {
+ return "Active";
+ }
+ },
+ Inactive {
+ public String toString() {
+ return "Inactive";
+ }
+ },
+ ScheduleCompleted {
+ public String toString() {
+ return "ScheduleCompleted";
+ }
+ },
+ BudgetReached {
+ public String toString() {
+ return "BudgetReached";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignsRequest.java b/src/src/main/java/com/relewise/client/model/CampaignsRequest.java
new file mode 100644
index 00000000..412d8d8d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignsRequest.java
@@ -0,0 +1,67 @@
+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 = CampaignsRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignsRequest extends CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.CampaignsRequest, Relewise.Client";
+ public static CampaignsRequest create(@Nullable CampaignsRequestEntityFilters filters, @Nullable CampaignsRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ return new CampaignsRequest(filters, sorting, skip, take);
+ }
+ public CampaignsRequest(@Nullable CampaignsRequestEntityFilters filters, @Nullable CampaignsRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ this.filters = filters;
+ this.sorting = sorting;
+ this.skip = skip;
+ this.take = take;
+ }
+ public CampaignsRequest()
+ {
+ }
+ @Override
+ public CampaignsRequest setFilters(CampaignsRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public CampaignsRequest setSorting(CampaignsRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ @Override
+ public CampaignsRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ @Override
+ public CampaignsRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignsRequestEntityFilters.java b/src/src/main/java/com/relewise/client/model/CampaignsRequestEntityFilters.java
new file mode 100644
index 00000000..0a97c8f7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignsRequestEntityFilters.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = CampaignsRequestEntityFilters.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignsRequestEntityFilters extends CampaignEntityStateCampaignMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.CampaignsRequest+EntityFilters, Relewise.Client";
+ public @Nullable UUID[] ids;
+ public @Nullable UUID[] advertiserIds;
+ public static CampaignsRequestEntityFilters create()
+ {
+ return new CampaignsRequestEntityFilters();
+ }
+ public CampaignsRequestEntityFilters()
+ {
+ }
+ public @Nullable UUID[] getIds()
+ {
+ return this.ids;
+ }
+ public @Nullable UUID[] getAdvertiserIds()
+ {
+ return this.advertiserIds;
+ }
+ public CampaignsRequestEntityFilters setIds(UUID... ids)
+ {
+ this.ids = ids;
+ return this;
+ }
+ public CampaignsRequestEntityFilters addToIds(UUID id)
+ {
+ if (this.ids == null)
+ {
+ this.ids = new UUID[] { id };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.ids));
+ existingList.add(id);
+ this.ids = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ public CampaignsRequestEntityFilters setAdvertiserIds(UUID... advertiserIds)
+ {
+ this.advertiserIds = advertiserIds;
+ return this;
+ }
+ public CampaignsRequestEntityFilters addToAdvertiserIds(UUID advertiserId)
+ {
+ if (this.advertiserIds == null)
+ {
+ this.advertiserIds = new UUID[] { advertiserId };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.advertiserIds));
+ existingList.add(advertiserId);
+ this.advertiserIds = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ @Override
+ public CampaignsRequestEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ @Override
+ public CampaignsRequestEntityFilters setStates(CampaignEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+ public CampaignsRequestEntityFilters addToStates(CampaignEntityState state)
+ {
+ if (this.states == null)
+ {
+ this.states = new CampaignEntityState[] { state };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.states));
+ existingList.add(state);
+ this.states = existingList.toArray(new CampaignEntityState[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBy.java b/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBy.java
new file mode 100644
index 00000000..361636ad
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBy.java
@@ -0,0 +1,37 @@
+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 enum CampaignsRequestSortBy
+{
+ Created {
+ public String toString() {
+ return "Created";
+ }
+ },
+ Modified {
+ public String toString() {
+ return "Modified";
+ }
+ },
+ Name {
+ public String toString() {
+ return "Name";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBySorting.java b/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBySorting.java
new file mode 100644
index 00000000..1a16d185
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignsRequestSortBySorting.java
@@ -0,0 +1,55 @@
+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 CampaignsRequestSortBySorting
+{
+ public CampaignsRequestSortBy sortBy;
+ public SortOrder sortOrder;
+ public static CampaignsRequestSortBySorting create(CampaignsRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ return new CampaignsRequestSortBySorting(sortBy, sortOrder);
+ }
+ public CampaignsRequestSortBySorting(CampaignsRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ this.sortBy = sortBy;
+ this.sortOrder = sortOrder;
+ }
+ public CampaignsRequestSortBySorting()
+ {
+ }
+ public CampaignsRequestSortBy getSortBy()
+ {
+ return this.sortBy;
+ }
+ public SortOrder getSortOrder()
+ {
+ return this.sortOrder;
+ }
+ public CampaignsRequestSortBySorting setSortBy(CampaignsRequestSortBy sortBy)
+ {
+ this.sortBy = sortBy;
+ return this;
+ }
+ public CampaignsRequestSortBySorting setSortOrder(SortOrder sortOrder)
+ {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CampaignsResponse.java b/src/src/main/java/com/relewise/client/model/CampaignsResponse.java
new file mode 100644
index 00000000..9f7c3dda
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CampaignsResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = CampaignsResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CampaignsResponse extends CampaignCampaignEntityStateEntityResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.CampaignsResponse, Relewise.Client";
+ public static CampaignsResponse create(Campaign[] campaigns, Integer hits, HashMap hitsPerState)
+ {
+ return new CampaignsResponse(campaigns, hits, hitsPerState);
+ }
+ public CampaignsResponse(Campaign[] campaigns, Integer hits, HashMap hitsPerState)
+ {
+ this.entities = campaigns;
+ this.hits = hits;
+ this.hitsPerState = hitsPerState;
+ }
+ public CampaignsResponse()
+ {
+ }
+ @Override
+ public CampaignsResponse setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public CampaignsResponse addToEntities(Campaign entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Campaign[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Campaign[0]);
+ }
+ return this;
+ }
+ @Override
+ public CampaignsResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public CampaignsResponse addToHitsPerState(CampaignEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ @Override
+ public CampaignsResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public CampaignsResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Cart.java b/src/src/main/java/com/relewise/client/model/Cart.java
index 5c4fe5ee..30505408 100644
--- a/src/src/main/java/com/relewise/client/model/Cart.java
+++ b/src/src/main/java/com/relewise/client/model/Cart.java
@@ -31,6 +31,8 @@ public class Cart extends Trackable implements IUserIdentifier
public @Nullable Money subtotal;
public @Nullable ArrayList lineItems;
public @Nullable HashMap data;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static Cart create(@Nullable User user, Money subtotal, LineItem... lineItems)
{
return new Cart(user, subtotal, lineItems);
@@ -76,6 +78,11 @@ public Cart()
{
return this.data;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public Cart setUser(User user)
{
this.user = user;
@@ -119,4 +126,10 @@ public Cart setData(HashMap data)
this.data = data;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public Cart setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/CartDataFilter.java b/src/src/main/java/com/relewise/client/model/CartDataFilter.java
index 93730c34..3c19dc2a 100644
--- a/src/src/main/java/com/relewise/client/model/CartDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/CartDataFilter.java
@@ -126,4 +126,10 @@ public CartDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public CartDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacet.java b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacet.java
new file mode 100644
index 00000000..71ef61d3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacet.java
@@ -0,0 +1,88 @@
+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 = CategoryHierarchyFacet.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CategoryHierarchyFacet extends CategoryPathValueFacet
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client";
+ public CategorySelectionStrategy categorySelectionStrategy;
+ public @Nullable SelectedCategoryPropertiesSettings selectedPropertiesSettings;
+ public static CategoryHierarchyFacet create(CategorySelectionStrategy categorySelectionStrategy, CategoryPath... selectedCategoryPath)
+ {
+ return new CategoryHierarchyFacet(categorySelectionStrategy, selectedCategoryPath);
+ }
+ public CategoryHierarchyFacet(CategorySelectionStrategy categorySelectionStrategy, CategoryPath... selectedCategoryPath)
+ {
+ this.categorySelectionStrategy = categorySelectionStrategy;
+ this.selected = new ArrayList<>(Arrays.asList(selectedCategoryPath));
+ }
+ public CategoryHierarchyFacet()
+ {
+ }
+ public CategorySelectionStrategy getCategorySelectionStrategy()
+ {
+ return this.categorySelectionStrategy;
+ }
+ public @Nullable SelectedCategoryPropertiesSettings getSelectedPropertiesSettings()
+ {
+ return this.selectedPropertiesSettings;
+ }
+ public CategoryHierarchyFacet setCategorySelectionStrategy(CategorySelectionStrategy categorySelectionStrategy)
+ {
+ this.categorySelectionStrategy = categorySelectionStrategy;
+ return this;
+ }
+ public CategoryHierarchyFacet setSelectedPropertiesSettings(SelectedCategoryPropertiesSettings selectedPropertiesSettings)
+ {
+ this.selectedPropertiesSettings = selectedPropertiesSettings;
+ return this;
+ }
+ @Override
+ public CategoryHierarchyFacet setSelected(CategoryPath... selected)
+ {
+ this.selected = new ArrayList<>(Arrays.asList(selected));;
+ return this;
+ }
+ public CategoryHierarchyFacet addToSelected(CategoryPath selected)
+ {
+ if (this.selected == null)
+ {
+ this.selected = new ArrayList<>();
+ }
+ this.selected.add(selected);
+ return this;
+ }
+ @Override
+ public CategoryHierarchyFacet setField(FacetingField field)
+ {
+ this.field = field;
+ return this;
+ }
+ @Override
+ public CategoryHierarchyFacet setSettings(FacetSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResult.java b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResult.java
new file mode 100644
index 00000000..777ff8dc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResult.java
@@ -0,0 +1,81 @@
+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 = CategoryHierarchyFacetResult.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CategoryHierarchyFacetResult extends FacetResult
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Facets.Result.CategoryHierarchyFacetResult, Relewise.Client";
+ public CategorySelectionStrategy categorySelectionStrategy;
+ public CategoryHierarchyFacetResultCategoryNode[] nodes;
+ public static CategoryHierarchyFacetResult create(CategorySelectionStrategy categorySelectionStrategy, CategoryHierarchyFacetResultCategoryNode... nodes)
+ {
+ return new CategoryHierarchyFacetResult(categorySelectionStrategy, nodes);
+ }
+ public CategoryHierarchyFacetResult(CategorySelectionStrategy categorySelectionStrategy, CategoryHierarchyFacetResultCategoryNode... nodes)
+ {
+ this.categorySelectionStrategy = categorySelectionStrategy;
+ this.nodes = nodes;
+ }
+ public CategoryHierarchyFacetResult()
+ {
+ }
+ public CategorySelectionStrategy getCategorySelectionStrategy()
+ {
+ return this.categorySelectionStrategy;
+ }
+ public CategoryHierarchyFacetResultCategoryNode[] getNodes()
+ {
+ return this.nodes;
+ }
+ public CategoryHierarchyFacetResult setCategorySelectionStrategy(CategorySelectionStrategy categorySelectionStrategy)
+ {
+ this.categorySelectionStrategy = categorySelectionStrategy;
+ return this;
+ }
+ public CategoryHierarchyFacetResult setNodes(CategoryHierarchyFacetResultCategoryNode... nodes)
+ {
+ this.nodes = nodes;
+ return this;
+ }
+ public CategoryHierarchyFacetResult addToNodes(CategoryHierarchyFacetResultCategoryNode node)
+ {
+ if (this.nodes == null)
+ {
+ this.nodes = new CategoryHierarchyFacetResultCategoryNode[] { node };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.nodes));
+ existingList.add(node);
+ this.nodes = existingList.toArray(new CategoryHierarchyFacetResultCategoryNode[0]);
+ }
+ return this;
+ }
+ @Override
+ public CategoryHierarchyFacetResult setField(FacetingField field)
+ {
+ this.field = field;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResultCategoryNode.java b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResultCategoryNode.java
new file mode 100644
index 00000000..44825297
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CategoryHierarchyFacetResultCategoryNode.java
@@ -0,0 +1,102 @@
+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 CategoryHierarchyFacetResultCategoryNode
+{
+ public CategoryResult category;
+ public Integer hits;
+ public @Nullable String parentId;
+ public @Nullable CategoryHierarchyFacetResultCategoryNode[] children;
+ public Boolean selected;
+ public static CategoryHierarchyFacetResultCategoryNode create(CategoryResult category, Integer hits, @Nullable String parentId, @Nullable CategoryHierarchyFacetResultCategoryNode[] children, Boolean selected)
+ {
+ return new CategoryHierarchyFacetResultCategoryNode(category, hits, parentId, children, selected);
+ }
+ public CategoryHierarchyFacetResultCategoryNode(CategoryResult category, Integer hits, @Nullable String parentId, @Nullable CategoryHierarchyFacetResultCategoryNode[] children, Boolean selected)
+ {
+ this.category = category;
+ this.hits = hits;
+ this.parentId = parentId;
+ this.children = children;
+ this.selected = selected;
+ }
+ public CategoryHierarchyFacetResultCategoryNode()
+ {
+ }
+ public CategoryResult getCategory()
+ {
+ return this.category;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public @Nullable String getParentId()
+ {
+ return this.parentId;
+ }
+ public @Nullable CategoryHierarchyFacetResultCategoryNode[] getChildren()
+ {
+ return this.children;
+ }
+ public Boolean getSelected()
+ {
+ return this.selected;
+ }
+ public CategoryHierarchyFacetResultCategoryNode setCategory(CategoryResult category)
+ {
+ this.category = category;
+ return this;
+ }
+ public CategoryHierarchyFacetResultCategoryNode setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public CategoryHierarchyFacetResultCategoryNode setParentId(String parentId)
+ {
+ this.parentId = parentId;
+ return this;
+ }
+ public CategoryHierarchyFacetResultCategoryNode setChildren(CategoryHierarchyFacetResultCategoryNode... children)
+ {
+ this.children = children;
+ return this;
+ }
+ public CategoryHierarchyFacetResultCategoryNode addToChildren(CategoryHierarchyFacetResultCategoryNode children)
+ {
+ if (this.children == null)
+ {
+ this.children = new CategoryHierarchyFacetResultCategoryNode[] { children };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.children));
+ existingList.add(children);
+ this.children = existingList.toArray(new CategoryHierarchyFacetResultCategoryNode[0]);
+ }
+ return this;
+ }
+ public CategoryHierarchyFacetResultCategoryNode setSelected(Boolean selected)
+ {
+ this.selected = selected;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryIdFilter.java b/src/src/main/java/com/relewise/client/model/CategoryIdFilter.java
index 0b2f6c4f..3e765911 100644
--- a/src/src/main/java/com/relewise/client/model/CategoryIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/CategoryIdFilter.java
@@ -64,4 +64,10 @@ public CategoryIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public CategoryIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryLevelFilter.java b/src/src/main/java/com/relewise/client/model/CategoryLevelFilter.java
index 15864f27..6e2ed219 100644
--- a/src/src/main/java/com/relewise/client/model/CategoryLevelFilter.java
+++ b/src/src/main/java/com/relewise/client/model/CategoryLevelFilter.java
@@ -54,4 +54,10 @@ public CategoryLevelFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public CategoryLevelFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/CategoryPathValueFacet.java b/src/src/main/java/com/relewise/client/model/CategoryPathValueFacet.java
new file mode 100644
index 00000000..5ec80e57
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CategoryPathValueFacet.java
@@ -0,0 +1,61 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class CategoryPathValueFacet extends Facet
+{
+ public String $type = "";
+ public @Nullable ArrayList selected;
+ public @Nullable ArrayList getSelected()
+ {
+ return this.selected;
+ }
+ public CategoryPathValueFacet setSelected(CategoryPath... selected)
+ {
+ this.selected = new ArrayList<>(Arrays.asList(selected));;
+ return this;
+ }
+ public CategoryPathValueFacet addToSelected(CategoryPath selected)
+ {
+ if (this.selected == null)
+ {
+ this.selected = new ArrayList<>();
+ }
+ this.selected.add(selected);
+ return this;
+ }
+ @Override
+ public CategoryPathValueFacet setField(FacetingField field)
+ {
+ this.field = field;
+ return this;
+ }
+ @Override
+ public CategoryPathValueFacet setSettings(FacetSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CategorySelectionStrategy.java b/src/src/main/java/com/relewise/client/model/CategorySelectionStrategy.java
index d4a40780..50a8a8de 100644
--- a/src/src/main/java/com/relewise/client/model/CategorySelectionStrategy.java
+++ b/src/src/main/java/com/relewise/client/model/CategorySelectionStrategy.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** Defines how entities are to be selected by given paths. */
public enum CategorySelectionStrategy
{
ImmediateParent {
@@ -29,4 +30,9 @@ public String toString() {
return "Ancestors";
}
},
+ Descendants {
+ public String toString() {
+ return "Descendants";
+ }
+ },
}
diff --git a/src/src/main/java/com/relewise/client/model/Change.java b/src/src/main/java/com/relewise/client/model/Change.java
new file mode 100644
index 00000000..79f4b720
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Change.java
@@ -0,0 +1,37 @@
+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;
+
+/** Indicates that some property should change by having a new value which is still of the same type. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = Change.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Change implements IChange
+{
+ public String $type = "Relewise.Client.DataTypes.Changes.Change, Relewise.Client";
+ public static Change create()
+ {
+ return new Change();
+ }
+ public Change()
+ {
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Channel.java b/src/src/main/java/com/relewise/client/model/Channel.java
new file mode 100644
index 00000000..f64745e7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Channel.java
@@ -0,0 +1,63 @@
+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 Channel
+{
+ public String name;
+ public @Nullable Channel subChannel;
+ public static Channel create(String name, Channel subChannel)
+ {
+ return new Channel(name, subChannel);
+ }
+ public Channel(String name, Channel subChannel)
+ {
+ this.name = name;
+ this.subChannel = subChannel;
+ }
+ public static Channel create(String name)
+ {
+ return new Channel(name);
+ }
+ public Channel(String name)
+ {
+ this.name = name;
+ }
+ public Channel()
+ {
+ }
+ public String getName()
+ {
+ return this.name;
+ }
+ public @Nullable Channel getSubChannel()
+ {
+ return this.subChannel;
+ }
+ public Channel setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ public Channel setSubChannel(Channel subChannel)
+ {
+ this.subChannel = subChannel;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Company.java b/src/src/main/java/com/relewise/client/model/Company.java
new file mode 100644
index 00000000..32a143bc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Company.java
@@ -0,0 +1,73 @@
+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 Company
+{
+ public String id;
+ public @Nullable Company parent;
+ public @Nullable HashMap data;
+ public static Company create(String id)
+ {
+ return new Company(id);
+ }
+ public Company(String id)
+ {
+ this.id = id;
+ }
+ public Company()
+ {
+ }
+ public String getId()
+ {
+ return this.id;
+ }
+ public @Nullable Company getParent()
+ {
+ return this.parent;
+ }
+ public @Nullable HashMap getData()
+ {
+ return this.data;
+ }
+ public Company setId(String id)
+ {
+ this.id = id;
+ return this;
+ }
+ public Company setParent(Company parent)
+ {
+ this.parent = parent;
+ return this;
+ }
+ public Company addToData(String key, DataValue value)
+ {
+ if (this.data == null)
+ {
+ this.data = new HashMap<>();
+ }
+ this.data.put(key, value);
+ return this;
+ }
+ public Company setData(HashMap data)
+ {
+ this.data = data;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyAdministrativeAction.java b/src/src/main/java/com/relewise/client/model/CompanyAdministrativeAction.java
new file mode 100644
index 00000000..644c5c04
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyAdministrativeAction.java
@@ -0,0 +1,83 @@
+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 = CompanyAdministrativeAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyAdministrativeAction extends Trackable
+{
+ public String $type = "Relewise.Client.DataTypes.CompanyAdministrativeAction, Relewise.Client";
+ public FilterCollection filters;
+ public @Nullable Language language;
+ public CompanyAdministrativeActionUpdateKind kind;
+ public @Nullable Currency currency;
+ public static CompanyAdministrativeAction create(@Nullable Language language, @Nullable Currency currency, FilterCollection filters, CompanyAdministrativeActionUpdateKind kind)
+ {
+ return new CompanyAdministrativeAction(language, currency, filters, kind);
+ }
+ public CompanyAdministrativeAction(@Nullable Language language, @Nullable Currency currency, FilterCollection filters, CompanyAdministrativeActionUpdateKind kind)
+ {
+ this.language = language;
+ this.currency = currency;
+ this.filters = filters;
+ this.kind = kind;
+ }
+ public CompanyAdministrativeAction()
+ {
+ }
+ public FilterCollection getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable Language getLanguage()
+ {
+ return this.language;
+ }
+ public CompanyAdministrativeActionUpdateKind getKind()
+ {
+ return this.kind;
+ }
+ public @Nullable Currency getCurrency()
+ {
+ return this.currency;
+ }
+ public CompanyAdministrativeAction setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public CompanyAdministrativeAction setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
+ public CompanyAdministrativeAction setKind(CompanyAdministrativeActionUpdateKind kind)
+ {
+ this.kind = kind;
+ return this;
+ }
+ public CompanyAdministrativeAction setCurrency(Currency currency)
+ {
+ this.currency = currency;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyAdministrativeActionUpdateKind.java b/src/src/main/java/com/relewise/client/model/CompanyAdministrativeActionUpdateKind.java
new file mode 100644
index 00000000..c17d7768
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyAdministrativeActionUpdateKind.java
@@ -0,0 +1,37 @@
+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 enum CompanyAdministrativeActionUpdateKind
+{
+ Disable {
+ public String toString() {
+ return "Disable";
+ }
+ },
+ Enable {
+ public String toString() {
+ return "Enable";
+ }
+ },
+ Delete {
+ public String toString() {
+ return "Delete";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyDataFilter.java b/src/src/main/java/com/relewise/client/model/CompanyDataFilter.java
new file mode 100644
index 00000000..6a9e4aed
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyDataFilter.java
@@ -0,0 +1,159 @@
+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 = CompanyDataFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyDataFilter extends DataFilter implements ICompanyFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.CompanyDataFilter, Relewise.Client";
+ public static CompanyDataFilter create(String key, String... objectPath)
+ {
+ return new CompanyDataFilter(key, objectPath);
+ }
+ public CompanyDataFilter(String key, String... objectPath)
+ {
+ this.key = key;
+ this.objectPath = objectPath;
+ this.conditions = null;
+ this.mustMatchAllConditions = true;
+ this.filterOutIfKeyIsNotFound = true;
+ this.language = null;
+ this.currency = null;
+ }
+ public static CompanyDataFilter create(String key, String[] objectPath, @Nullable ValueConditionCollection conditions, Boolean mustMatchAllConditions, Boolean filterOutIfKeyIsNotFound, @Nullable Language language, Currency currency)
+ {
+ return new CompanyDataFilter(key, objectPath, conditions, mustMatchAllConditions, filterOutIfKeyIsNotFound, language, currency);
+ }
+ public CompanyDataFilter(String key, String[] objectPath, @Nullable ValueConditionCollection conditions, Boolean mustMatchAllConditions, Boolean filterOutIfKeyIsNotFound, @Nullable Language language, Currency currency)
+ {
+ this.key = key;
+ this.objectPath = objectPath;
+ this.conditions = conditions;
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ this.filterOutIfKeyIsNotFound = filterOutIfKeyIsNotFound;
+ this.language = language;
+ this.currency = currency;
+ }
+ public static CompanyDataFilter create(String key)
+ {
+ return new CompanyDataFilter(key);
+ }
+ public CompanyDataFilter(String key)
+ {
+ this.key = key;
+ this.conditions = null;
+ this.mustMatchAllConditions = true;
+ this.filterOutIfKeyIsNotFound = true;
+ this.language = null;
+ this.currency = null;
+ }
+ public static CompanyDataFilter create(String key, @Nullable ValueConditionCollection conditions, Boolean mustMatchAllConditions, Boolean filterOutIfKeyIsNotFound, @Nullable Language language, Currency currency)
+ {
+ return new CompanyDataFilter(key, conditions, mustMatchAllConditions, filterOutIfKeyIsNotFound, language, currency);
+ }
+ public CompanyDataFilter(String key, @Nullable ValueConditionCollection conditions, Boolean mustMatchAllConditions, Boolean filterOutIfKeyIsNotFound, @Nullable Language language, Currency currency)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ this.filterOutIfKeyIsNotFound = filterOutIfKeyIsNotFound;
+ this.language = language;
+ this.currency = currency;
+ }
+ public CompanyDataFilter()
+ {
+ this.filterOutIfKeyIsNotFound = true;
+ this.mustMatchAllConditions = true;
+ this.conditions = null;
+ this.language = null;
+ this.currency = null;
+ }
+ @Override
+ public CompanyDataFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setFilterOutIfKeyIsNotFound(Boolean filterOutIfKeyIsNotFound)
+ {
+ this.filterOutIfKeyIsNotFound = filterOutIfKeyIsNotFound;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setMustMatchAllConditions(Boolean mustMatchAllConditions)
+ {
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setConditions(ValueConditionCollection conditions)
+ {
+ this.conditions = conditions;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setCurrency(Currency currency)
+ {
+ this.currency = currency;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setObjectPath(String... objectPath)
+ {
+ this.objectPath = objectPath;
+ return this;
+ }
+ public CompanyDataFilter 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;
+ }
+ @Override
+ public CompanyDataFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public CompanyDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/CompanyDataHasKeyFilter.java
new file mode 100644
index 00000000..97bbdfc6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = CompanyDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyDataHasKeyFilter extends Filter implements ICompanyFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.CompanyDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static CompanyDataHasKeyFilter create(String key)
+ {
+ return new CompanyDataHasKeyFilter(key);
+ }
+ public CompanyDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static CompanyDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new CompanyDataHasKeyFilter(key, negated);
+ }
+ public CompanyDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public CompanyDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public CompanyDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public CompanyDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public CompanyDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyDisabledFilter.java b/src/src/main/java/com/relewise/client/model/CompanyDisabledFilter.java
new file mode 100644
index 00000000..2a0a900c
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = CompanyDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyDisabledFilter extends Filter implements ICompanyFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.CompanyDisabledFilter, Relewise.Client";
+ public static CompanyDisabledFilter create()
+ {
+ return new CompanyDisabledFilter();
+ }
+ public CompanyDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static CompanyDisabledFilter create(Boolean negated)
+ {
+ return new CompanyDisabledFilter(negated);
+ }
+ public CompanyDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public CompanyDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public CompanyDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyIdFilter.java b/src/src/main/java/com/relewise/client/model/CompanyIdFilter.java
new file mode 100644
index 00000000..2a4ac727
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyIdFilter.java
@@ -0,0 +1,76 @@
+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 = CompanyIdFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyIdFilter extends Filter implements ICompanyFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.CompanyIdFilter, Relewise.Client";
+ public ArrayList companyIds;
+ public static CompanyIdFilter create()
+ {
+ return new CompanyIdFilter();
+ }
+ public CompanyIdFilter()
+ {
+ this.negated = false;
+ }
+ public static CompanyIdFilter create(Boolean negated)
+ {
+ return new CompanyIdFilter(negated);
+ }
+ public CompanyIdFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ArrayList getCompanyIds()
+ {
+ return this.companyIds;
+ }
+ public CompanyIdFilter setCompanyIds(String... companyIds)
+ {
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));;
+ return this;
+ }
+ public CompanyIdFilter addToCompanyIds(String companyIds)
+ {
+ if (this.companyIds == null)
+ {
+ this.companyIds = new ArrayList<>();
+ }
+ this.companyIds.add(companyIds);
+ return this;
+ }
+ @Override
+ public CompanyIdFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public CompanyIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyUpdate.java b/src/src/main/java/com/relewise/client/model/CompanyUpdate.java
new file mode 100644
index 00000000..52a835a2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyUpdate.java
@@ -0,0 +1,109 @@
+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 = CompanyUpdate.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CompanyUpdate extends Trackable
+{
+ public String $type = "Relewise.Client.DataTypes.CompanyUpdate, Relewise.Client";
+ public Company company;
+ public CompanyUpdateUpdateKind kind;
+ public @Nullable Company[] parents;
+ public Boolean replaceExistingParents;
+ public static CompanyUpdate create(Company company, Boolean replaceExistingParents, Company... parents)
+ {
+ return new CompanyUpdate(company, replaceExistingParents, parents);
+ }
+ public CompanyUpdate(Company company, Boolean replaceExistingParents, Company... parents)
+ {
+ this.company = company;
+ this.replaceExistingParents = replaceExistingParents;
+ this.parents = parents;
+ this.kind = CompanyUpdateUpdateKind.UpdateAndAppend;
+ }
+ public static CompanyUpdate create(Company company, Boolean replaceExistingParents, @Nullable Company[] parents, CompanyUpdateUpdateKind kind)
+ {
+ return new CompanyUpdate(company, replaceExistingParents, parents, kind);
+ }
+ public CompanyUpdate(Company company, Boolean replaceExistingParents, @Nullable Company[] parents, CompanyUpdateUpdateKind kind)
+ {
+ this.company = company;
+ this.replaceExistingParents = replaceExistingParents;
+ this.parents = parents;
+ this.kind = kind;
+ }
+ public CompanyUpdate()
+ {
+ this.kind = CompanyUpdateUpdateKind.UpdateAndAppend;
+ }
+ public Company getCompany()
+ {
+ return this.company;
+ }
+ public CompanyUpdateUpdateKind getKind()
+ {
+ return this.kind;
+ }
+ public @Nullable Company[] getParents()
+ {
+ return this.parents;
+ }
+ public Boolean getReplaceExistingParents()
+ {
+ return this.replaceExistingParents;
+ }
+ public CompanyUpdate setCompany(Company company)
+ {
+ this.company = company;
+ return this;
+ }
+ public CompanyUpdate setKind(CompanyUpdateUpdateKind kind)
+ {
+ this.kind = kind;
+ return this;
+ }
+ public CompanyUpdate setParents(Company... parents)
+ {
+ this.parents = parents;
+ return this;
+ }
+ public CompanyUpdate addToParents(Company parent)
+ {
+ if (this.parents == null)
+ {
+ this.parents = new Company[] { parent };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.parents));
+ existingList.add(parent);
+ this.parents = existingList.toArray(new Company[0]);
+ }
+ return this;
+ }
+ public CompanyUpdate setReplaceExistingParents(Boolean replaceExistingParents)
+ {
+ this.replaceExistingParents = replaceExistingParents;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/CompanyUpdateUpdateKind.java b/src/src/main/java/com/relewise/client/model/CompanyUpdateUpdateKind.java
new file mode 100644
index 00000000..7d0bae8d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/CompanyUpdateUpdateKind.java
@@ -0,0 +1,37 @@
+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 enum CompanyUpdateUpdateKind
+{
+ UpdateAndAppend {
+ public String toString() {
+ return "UpdateAndAppend";
+ }
+ },
+ ReplaceProvidedProperties {
+ public String toString() {
+ return "ReplaceProvidedProperties";
+ }
+ },
+ ClearAndReplace {
+ public String toString() {
+ return "ClearAndReplace";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/ContentAssortmentFilter.java
new file mode 100644
index 00000000..998edc69
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentAssortmentFilter.java
@@ -0,0 +1,76 @@
+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 = ContentAssortmentFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentAssortmentFilter extends Filter implements IContentFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentAssortmentFilter, Relewise.Client";
+ public ArrayList assortments;
+ public static ContentAssortmentFilter create()
+ {
+ return new ContentAssortmentFilter();
+ }
+ public ContentAssortmentFilter()
+ {
+ this.negated = false;
+ }
+ public static ContentAssortmentFilter create(Boolean negated)
+ {
+ return new ContentAssortmentFilter(negated);
+ }
+ public ContentAssortmentFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ArrayList getAssortments()
+ {
+ return this.assortments;
+ }
+ public ContentAssortmentFilter setAssortments(Integer... assortments)
+ {
+ this.assortments = new ArrayList<>(Arrays.asList(assortments));;
+ return this;
+ }
+ public ContentAssortmentFilter addToAssortments(Integer assortments)
+ {
+ if (this.assortments == null)
+ {
+ this.assortments = new ArrayList<>();
+ }
+ this.assortments.add(assortments);
+ return this;
+ }
+ @Override
+ public ContentAssortmentFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryAssortmentFilter.java
index 42558da1..fd4e75c6 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryAssortmentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryAssortmentFilter.java
@@ -67,4 +67,10 @@ public ContentCategoryAssortmentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryDataFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryDataFilter.java
index 37694174..db6684c5 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryDataFilter.java
@@ -150,4 +150,10 @@ public ContentCategoryDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryDataHasKeyFilter.java
new file mode 100644
index 00000000..c607dbcc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = ContentCategoryDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryDataHasKeyFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentCategoryDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static ContentCategoryDataHasKeyFilter create(String key)
+ {
+ return new ContentCategoryDataHasKeyFilter(key);
+ }
+ public ContentCategoryDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static ContentCategoryDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new ContentCategoryDataHasKeyFilter(key, negated);
+ }
+ public ContentCategoryDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public ContentCategoryDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public ContentCategoryDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java
new file mode 100644
index 00000000..3a392abd
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryDataRelevanceModifier.java
@@ -0,0 +1,121 @@
+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 RelevanceModifier
that can change the relevance of a ContentCategory depending on matching conditions on a certain key. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentCategoryDataRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryDataRelevanceModifier extends DataRelevanceModifier implements IContentCategoryRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryDataRelevanceModifier, Relewise.Client";
+ public static ContentCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ return new ContentCategoryDataRelevanceModifier(key, conditions, multiplierSelector);
+ }
+ public ContentCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = true;
+ this.considerAsMatchIfKeyIsNotFound = false;
+ }
+ /**
+ * 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).
+ */
+ public static ContentCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ return new ContentCategoryDataRelevanceModifier(key, conditions, multiplierSelector, mustMatchAllConditions, considerAsMatchIfKeyIsNotFound);
+ }
+ /**
+ * 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).
+ */
+ public ContentCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ }
+ public ContentCategoryDataRelevanceModifier()
+ {
+ this.considerAsMatchIfKeyIsNotFound = false;
+ this.mustMatchAllConditions = true;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ return this;
+ }
+ /** @deprecated Use MultiplierSelector instead */
+ @Override
+ public ContentCategoryDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
+ {
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setConditions(ValueCondition... conditions)
+ {
+ this.conditions = new ArrayList<>(Arrays.asList(conditions));;
+ return this;
+ }
+ public ContentCategoryDataRelevanceModifier addToConditions(ValueCondition conditions)
+ {
+ if (this.conditions == null)
+ {
+ this.conditions = new ArrayList<>();
+ }
+ this.conditions.add(conditions);
+ return this;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
+ {
+ this.multiplierSelector = multiplierSelector;
+ return this;
+ }
+ @Override
+ public ContentCategoryDataRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryDisabledFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryDisabledFilter.java
new file mode 100644
index 00000000..7c4785ff
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentCategoryDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryDisabledFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentCategoryDisabledFilter, Relewise.Client";
+ public static ContentCategoryDisabledFilter create()
+ {
+ return new ContentCategoryDisabledFilter();
+ }
+ public ContentCategoryDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static ContentCategoryDisabledFilter create(Boolean negated)
+ {
+ return new ContentCategoryDisabledFilter(negated);
+ }
+ public ContentCategoryDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public ContentCategoryDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentCategoryDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryHasAncestorFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryHasAncestorFilter.java
index a1fa3458..cfb93ee6 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryHasAncestorFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryHasAncestorFilter.java
@@ -63,4 +63,10 @@ public ContentCategoryHasAncestorFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryHasAncestorFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryHasChildFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryHasChildFilter.java
index 8c5f50ad..eaa2f67e 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryHasChildFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryHasChildFilter.java
@@ -63,4 +63,10 @@ public ContentCategoryHasChildFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryHasChildFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryHasContentsFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryHasContentsFilter.java
new file mode 100644
index 00000000..1f8e3833
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryHasContentsFilter.java
@@ -0,0 +1,52 @@
+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 = ContentCategoryHasContentsFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryHasContentsFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentCategoryHasContentsFilter, Relewise.Client";
+ public static ContentCategoryHasContentsFilter create(Boolean negated)
+ {
+ return new ContentCategoryHasContentsFilter(negated);
+ }
+ public ContentCategoryHasContentsFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ContentCategoryHasContentsFilter()
+ {
+ }
+ @Override
+ public ContentCategoryHasContentsFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentCategoryHasContentsFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryHasParentFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryHasParentFilter.java
index 2f866483..4f994098 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryHasParentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryHasParentFilter.java
@@ -63,4 +63,10 @@ public ContentCategoryHasParentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryHasParentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryIdFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryIdFilter.java
index 03e27a13..951949f6 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryIdFilter.java
@@ -75,4 +75,10 @@ public ContentCategoryIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryLevelFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryLevelFilter.java
index 46efa57a..c5604612 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryLevelFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryLevelFilter.java
@@ -63,4 +63,10 @@ public ContentCategoryLevelFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentCategoryLevelFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserFilter.java b/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserFilter.java
new file mode 100644
index 00000000..a3147b0a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserFilter.java
@@ -0,0 +1,83 @@
+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 = ContentCategoryRecentlyViewedByUserFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryRecentlyViewedByUserFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentCategoryRecentlyViewedByUserFilter, Relewise.Client";
+ public @Nullable OffsetDateTime sinceUtc;
+ public @Nullable Integer sinceMinutesAgo;
+ public static ContentCategoryRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ContentCategoryRecentlyViewedByUserFilter(sinceUtc);
+ }
+ public ContentCategoryRecentlyViewedByUserFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ public static ContentCategoryRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ContentCategoryRecentlyViewedByUserFilter(sinceUtc, negated);
+ }
+ public ContentCategoryRecentlyViewedByUserFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ContentCategoryRecentlyViewedByUserFilter()
+ {
+ this.negated = false;
+ }
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ public ContentCategoryRecentlyViewedByUserFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ public ContentCategoryRecentlyViewedByUserFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserRelevanceModifier.java
new file mode 100644
index 00000000..39a75b68
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryRecentlyViewedByUserRelevanceModifier.java
@@ -0,0 +1,97 @@
+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 RelevanceModifier
that can change the relevance of a ContentCategory depending on whether they have viewed this content within some timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentCategoryRecentlyViewedByUserRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentCategoryRecentlyViewedByUserRelevanceModifier extends RecentlyViewedByUserRelevanceModifier implements IContentCategoryRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client";
+ public static ContentCategoryRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc)
+ {
+ return new ContentCategoryRecentlyViewedByUserRelevanceModifier(sinceUtc);
+ }
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a ContentCategory depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public static ContentCategoryRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ return new ContentCategoryRecentlyViewedByUserRelevanceModifier(sinceUtc, ifPreviouslyViewedByUserMultiplyWeightBy, ifNotPreviouslyViewedByUserMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a ContentCategory depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ }
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier()
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier setIfPreviouslyViewedByUserMultiplyWeightBy(Double ifPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier setIfNotPreviouslyViewedByUserMultiplyWeightBy(Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ContentCategoryRecentlyViewedByUserRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequest.java
index 7569112e..61b6483a 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequest.java
@@ -75,4 +75,11 @@ public ContentCategoryRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentCategoryRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestCollection.java b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestCollection.java
index 51f5303c..41331186 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestCollection.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestCollection.java
@@ -27,14 +27,14 @@ public class ContentCategoryRecommendationRequestCollection extends LicensedRequ
{
public String $type = "Relewise.Client.Requests.Recommendations.ContentCategoryRecommendationRequestCollection, Relewise.Client";
public ArrayList requests;
- public Boolean requireDistinctContentAcrossResults;
- public static ContentCategoryRecommendationRequestCollection create(Boolean requireDistinctContentsAcrossResults, ContentCategoryRecommendationRequest... requests)
+ public Boolean requireDistinctCategoriesAcrossResults;
+ public static ContentCategoryRecommendationRequestCollection create(Boolean requireDistinctCategoriesesAcrossResults, ContentCategoryRecommendationRequest... requests)
{
- return new ContentCategoryRecommendationRequestCollection(requireDistinctContentsAcrossResults, requests);
+ return new ContentCategoryRecommendationRequestCollection(requireDistinctCategoriesesAcrossResults, requests);
}
- public ContentCategoryRecommendationRequestCollection(Boolean requireDistinctContentsAcrossResults, ContentCategoryRecommendationRequest... requests)
+ public ContentCategoryRecommendationRequestCollection(Boolean requireDistinctCategoriesesAcrossResults, ContentCategoryRecommendationRequest... requests)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentsAcrossResults;
+ this.requireDistinctCategoriesAcrossResults = requireDistinctCategoriesesAcrossResults;
this.requests = new ArrayList<>(Arrays.asList(requests));
}
public ContentCategoryRecommendationRequestCollection()
@@ -44,9 +44,9 @@ public ArrayList getRequests()
{
return this.requests;
}
- public Boolean getRequireDistinctContentAcrossResults()
+ public Boolean getRequireDistinctCategoriesAcrossResults()
{
- return this.requireDistinctContentAcrossResults;
+ return this.requireDistinctCategoriesAcrossResults;
}
public ContentCategoryRecommendationRequestCollection setRequests(ContentCategoryRecommendationRequest... requests)
{
@@ -62,9 +62,9 @@ public ContentCategoryRecommendationRequestCollection addToRequests(ContentCateg
this.requests.add(requests);
return this;
}
- public ContentCategoryRecommendationRequestCollection setRequireDistinctContentAcrossResults(Boolean requireDistinctContentAcrossResults)
+ public ContentCategoryRecommendationRequestCollection setRequireDistinctCategoriesAcrossResults(Boolean requireDistinctCategoriesAcrossResults)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentAcrossResults;
+ this.requireDistinctCategoriesAcrossResults = requireDistinctCategoriesAcrossResults;
return this;
}
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestSettings.java
index 656f9051..4d4b1d0e 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryRecommendationRequestSettings.java
@@ -25,6 +25,7 @@ public class ContentCategoryRecommendationRequestSettings
public Boolean allowReplacingOfRecentlyShownRecommendations;
public Boolean prioritizeDiversityBetweenRequests;
public SelectedContentCategoryPropertiesSettings selectedContentCategoryProperties;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static ContentCategoryRecommendationRequestSettings create()
{
return new ContentCategoryRecommendationRequestSettings();
@@ -52,6 +53,10 @@ public SelectedContentCategoryPropertiesSettings getSelectedContentCategoryPrope
{
return this.selectedContentCategoryProperties;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public ContentCategoryRecommendationRequestSettings setNumberOfRecommendations(Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -77,4 +82,9 @@ public ContentCategoryRecommendationRequestSettings setSelectedContentCategoryPr
this.selectedContentCategoryProperties = selectedContentCategoryProperties;
return this;
}
+ public ContentCategoryRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategorySearchRequest.java b/src/src/main/java/com/relewise/client/model/ContentCategorySearchRequest.java
index 572a241e..57e8a318 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategorySearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategorySearchRequest.java
@@ -138,4 +138,11 @@ public ContentCategorySearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentCategorySearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentCategoryView.java b/src/src/main/java/com/relewise/client/model/ContentCategoryView.java
index 085f50ad..5f2bd3ab 100644
--- a/src/src/main/java/com/relewise/client/model/ContentCategoryView.java
+++ b/src/src/main/java/com/relewise/client/model/ContentCategoryView.java
@@ -28,6 +28,8 @@ public class ContentCategoryView extends Trackable implements IUserIdentifier
public String $type = "Relewise.Client.DataTypes.ContentCategoryView, Relewise.Client";
public @Nullable User user;
public String[] idPath;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static ContentCategoryView create(@Nullable User user, String... idPath)
{
return new ContentCategoryView(user, idPath);
@@ -48,6 +50,11 @@ public String[] getIdPath()
{
return this.idPath;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public ContentCategoryView setUser(User user)
{
this.user = user;
@@ -72,4 +79,10 @@ public ContentCategoryView addToIdPath(String idPath)
}
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public ContentCategoryView setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentDataFilter.java b/src/src/main/java/com/relewise/client/model/ContentDataFilter.java
index ec24e9be..b05d1a4e 100644
--- a/src/src/main/java/com/relewise/client/model/ContentDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentDataFilter.java
@@ -150,4 +150,10 @@ public ContentDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/ContentDataHasKeyFilter.java
new file mode 100644
index 00000000..ad11513f
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = ContentDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentDataHasKeyFilter extends Filter implements IContentFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static ContentDataHasKeyFilter create(String key)
+ {
+ return new ContentDataHasKeyFilter(key);
+ }
+ public ContentDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static ContentDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new ContentDataHasKeyFilter(key, negated);
+ }
+ public ContentDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public ContentDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public ContentDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ContentDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java
new file mode 100644
index 00000000..d083eaa3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentDataRelevanceModifier.java
@@ -0,0 +1,121 @@
+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 RelevanceModifier
that can change the relevance of a Content depending on matching conditions on a certain key. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentDataRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentDataRelevanceModifier extends DataRelevanceModifier implements IContentRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ContentDataRelevanceModifier, Relewise.Client";
+ public static ContentDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ return new ContentDataRelevanceModifier(key, conditions, multiplierSelector);
+ }
+ public ContentDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = true;
+ this.considerAsMatchIfKeyIsNotFound = false;
+ }
+ /**
+ * 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).
+ */
+ public static ContentDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ return new ContentDataRelevanceModifier(key, conditions, multiplierSelector, mustMatchAllConditions, considerAsMatchIfKeyIsNotFound);
+ }
+ /**
+ * 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).
+ */
+ public ContentDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ }
+ public ContentDataRelevanceModifier()
+ {
+ this.considerAsMatchIfKeyIsNotFound = false;
+ this.mustMatchAllConditions = true;
+ }
+ @Override
+ public ContentDataRelevanceModifier setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ContentDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ return this;
+ }
+ /** @deprecated Use MultiplierSelector instead */
+ @Override
+ public ContentDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentDataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
+ {
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ return this;
+ }
+ @Override
+ public ContentDataRelevanceModifier setConditions(ValueCondition... conditions)
+ {
+ this.conditions = new ArrayList<>(Arrays.asList(conditions));;
+ return this;
+ }
+ public ContentDataRelevanceModifier addToConditions(ValueCondition conditions)
+ {
+ if (this.conditions == null)
+ {
+ this.conditions = new ArrayList<>();
+ }
+ this.conditions.add(conditions);
+ return this;
+ }
+ @Override
+ public ContentDataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
+ {
+ this.multiplierSelector = multiplierSelector;
+ return this;
+ }
+ @Override
+ public ContentDataRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentDisabledFilter.java b/src/src/main/java/com/relewise/client/model/ContentDisabledFilter.java
new file mode 100644
index 00000000..2d6c166d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentDisabledFilter extends Filter implements IContentFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentDisabledFilter, Relewise.Client";
+ public static ContentDisabledFilter create()
+ {
+ return new ContentDisabledFilter();
+ }
+ public ContentDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static ContentDisabledFilter create(Boolean negated)
+ {
+ return new ContentDisabledFilter(negated);
+ }
+ public ContentDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public ContentDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentFacetQuery.java b/src/src/main/java/com/relewise/client/model/ContentFacetQuery.java
index 01bfa13e..300d8fe6 100644
--- a/src/src/main/java/com/relewise/client/model/ContentFacetQuery.java
+++ b/src/src/main/java/com/relewise/client/model/ContentFacetQuery.java
@@ -17,9 +17,15 @@
import java.util.Set;
import java.util.HashSet;
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentFacetQuery.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ContentFacetQuery
+public class ContentFacetQuery extends FacetQuery
{
+ public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.ContentFacetQuery, Relewise.Client";
public ArrayList items;
public static ContentFacetQuery create()
{
diff --git a/src/src/main/java/com/relewise/client/model/ContentHasCategoriesFilter.java b/src/src/main/java/com/relewise/client/model/ContentHasCategoriesFilter.java
new file mode 100644
index 00000000..fe947b27
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentHasCategoriesFilter.java
@@ -0,0 +1,52 @@
+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 = ContentHasCategoriesFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentHasCategoriesFilter extends Filter implements IContentFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentHasCategoriesFilter, Relewise.Client";
+ public static ContentHasCategoriesFilter create(Boolean negated)
+ {
+ return new ContentHasCategoriesFilter(negated);
+ }
+ public ContentHasCategoriesFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ContentHasCategoriesFilter()
+ {
+ }
+ @Override
+ public ContentHasCategoriesFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentHasCategoriesFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentIdFilter.java b/src/src/main/java/com/relewise/client/model/ContentIdFilter.java
index b55bd64b..cefd679e 100644
--- a/src/src/main/java/com/relewise/client/model/ContentIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ContentIdFilter.java
@@ -67,4 +67,10 @@ public ContentIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ContentIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserFilter.java b/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserFilter.java
new file mode 100644
index 00000000..2a10e7dc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserFilter.java
@@ -0,0 +1,83 @@
+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 = ContentRecentlyViewedByUserFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentRecentlyViewedByUserFilter extends Filter implements IContentFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ContentRecentlyViewedByUserFilter, Relewise.Client";
+ public @Nullable OffsetDateTime sinceUtc;
+ public @Nullable Integer sinceMinutesAgo;
+ public static ContentRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ContentRecentlyViewedByUserFilter(sinceUtc);
+ }
+ public ContentRecentlyViewedByUserFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ public static ContentRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ContentRecentlyViewedByUserFilter(sinceUtc, negated);
+ }
+ public ContentRecentlyViewedByUserFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ContentRecentlyViewedByUserFilter()
+ {
+ this.negated = false;
+ }
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ public ContentRecentlyViewedByUserFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ public ContentRecentlyViewedByUserFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserRelevanceModifier.java
new file mode 100644
index 00000000..c060efd3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ContentRecentlyViewedByUserRelevanceModifier.java
@@ -0,0 +1,97 @@
+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 RelevanceModifier
that can change the relevance of a Content depending on whether they have viewed this content within some timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ContentRecentlyViewedByUserRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ContentRecentlyViewedByUserRelevanceModifier extends RecentlyViewedByUserRelevanceModifier implements IContentRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ContentRecentlyViewedByUserRelevanceModifier, Relewise.Client";
+ public static ContentRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc)
+ {
+ return new ContentRecentlyViewedByUserRelevanceModifier(sinceUtc);
+ }
+ public ContentRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Content depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public static ContentRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ return new ContentRecentlyViewedByUserRelevanceModifier(sinceUtc, ifPreviouslyViewedByUserMultiplyWeightBy, ifNotPreviouslyViewedByUserMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Content depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public ContentRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ }
+ public ContentRecentlyViewedByUserRelevanceModifier()
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ @Override
+ public ContentRecentlyViewedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserRelevanceModifier setIfPreviouslyViewedByUserMultiplyWeightBy(Double ifPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserRelevanceModifier setIfNotPreviouslyViewedByUserMultiplyWeightBy(Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ContentRecentlyViewedByUserRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequest.java
index bb34dd30..25ba7877 100644
--- a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequest.java
@@ -79,4 +79,11 @@ public ContentRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestCollection.java b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestCollection.java
index de9610f1..f0cf2262 100644
--- a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestCollection.java
+++ b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestCollection.java
@@ -27,14 +27,14 @@ public class ContentRecommendationRequestCollection extends LicensedRequest
{
public String $type = "Relewise.Client.Requests.Recommendations.ContentRecommendationRequestCollection, Relewise.Client";
public ArrayList requests;
- public Boolean requireDistinctContentAcrossResults;
+ public Boolean requireDistinctContentsAcrossResults;
public static ContentRecommendationRequestCollection create(Boolean requireDistinctContentsAcrossResults, ContentRecommendationRequest... requests)
{
return new ContentRecommendationRequestCollection(requireDistinctContentsAcrossResults, requests);
}
public ContentRecommendationRequestCollection(Boolean requireDistinctContentsAcrossResults, ContentRecommendationRequest... requests)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentsAcrossResults;
+ this.requireDistinctContentsAcrossResults = requireDistinctContentsAcrossResults;
this.requests = new ArrayList<>(Arrays.asList(requests));
}
public ContentRecommendationRequestCollection()
@@ -44,9 +44,9 @@ public ArrayList getRequests()
{
return this.requests;
}
- public Boolean getRequireDistinctContentAcrossResults()
+ public Boolean getRequireDistinctContentsAcrossResults()
{
- return this.requireDistinctContentAcrossResults;
+ return this.requireDistinctContentsAcrossResults;
}
public ContentRecommendationRequestCollection setRequests(ContentRecommendationRequest... requests)
{
@@ -62,9 +62,9 @@ public ContentRecommendationRequestCollection addToRequests(ContentRecommendatio
this.requests.add(requests);
return this;
}
- public ContentRecommendationRequestCollection setRequireDistinctContentAcrossResults(Boolean requireDistinctContentAcrossResults)
+ public ContentRecommendationRequestCollection setRequireDistinctContentsAcrossResults(Boolean requireDistinctContentsAcrossResults)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentAcrossResults;
+ this.requireDistinctContentsAcrossResults = requireDistinctContentsAcrossResults;
return this;
}
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestSettings.java
index 2437e918..53df75aa 100644
--- a/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/ContentRecommendationRequestSettings.java
@@ -25,6 +25,7 @@ public class ContentRecommendationRequestSettings
public Boolean allowReplacingOfRecentlyShownRecommendations;
public @Nullable SelectedContentPropertiesSettings selectedContentProperties;
public Boolean prioritizeDiversityBetweenRequests;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static ContentRecommendationRequestSettings create()
{
return new ContentRecommendationRequestSettings();
@@ -52,6 +53,10 @@ public Boolean getPrioritizeDiversityBetweenRequests()
{
return this.prioritizeDiversityBetweenRequests;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public ContentRecommendationRequestSettings setNumberOfRecommendations(Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -77,4 +82,9 @@ public ContentRecommendationRequestSettings setPrioritizeDiversityBetweenRequest
this.prioritizeDiversityBetweenRequests = prioritizeDiversityBetweenRequests;
return this;
}
+ public ContentRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentSearchRequest.java b/src/src/main/java/com/relewise/client/model/ContentSearchRequest.java
index 754224b1..212ecf5f 100644
--- a/src/src/main/java/com/relewise/client/model/ContentSearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentSearchRequest.java
@@ -158,4 +158,11 @@ public ContentSearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentSearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentView.java b/src/src/main/java/com/relewise/client/model/ContentView.java
index 68dcd24e..128dafc3 100644
--- a/src/src/main/java/com/relewise/client/model/ContentView.java
+++ b/src/src/main/java/com/relewise/client/model/ContentView.java
@@ -28,6 +28,8 @@ public class ContentView extends Trackable implements IUserIdentifier
public String $type = "Relewise.Client.DataTypes.ContentView, Relewise.Client";
public @Nullable User user;
public Content content;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static ContentView create(@Nullable User user, Content content)
{
return new ContentView(user, content);
@@ -48,6 +50,11 @@ public Content getContent()
{
return this.content;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public ContentView setUser(User user)
{
this.user = user;
@@ -58,4 +65,10 @@ public ContentView setContent(Content content)
this.content = content;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public ContentView setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingContentRequest.java b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingContentRequest.java
index 78abaeff..187dd7eb 100644
--- a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingContentRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingContentRequest.java
@@ -93,4 +93,11 @@ public ContentsViewedAfterViewingContentRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentsViewedAfterViewingContentRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleContentsRequest.java b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleContentsRequest.java
index 6d5b3cfd..7f69cdac 100644
--- a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleContentsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleContentsRequest.java
@@ -107,4 +107,11 @@ public ContentsViewedAfterViewingMultipleContentsRequest setCurrency(Currency cu
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentsViewedAfterViewingMultipleContentsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleProductsRequest.java b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleProductsRequest.java
index 93bcd821..15a528e4 100644
--- a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingMultipleProductsRequest.java
@@ -107,4 +107,11 @@ public ContentsViewedAfterViewingMultipleProductsRequest setCurrency(Currency cu
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentsViewedAfterViewingMultipleProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingProductRequest.java b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingProductRequest.java
index bb4f43b6..2c4edf47 100644
--- a/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingProductRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ContentsViewedAfterViewingProductRequest.java
@@ -93,4 +93,11 @@ public ContentsViewedAfterViewingProductRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ContentsViewedAfterViewingProductRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/CustomProductRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/CustomProductRecommendationRequest.java
index 74fcca80..de24abac 100644
--- a/src/src/main/java/com/relewise/client/model/CustomProductRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/CustomProductRecommendationRequest.java
@@ -112,4 +112,11 @@ public CustomProductRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public CustomProductRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/DataFilter.java b/src/src/main/java/com/relewise/client/model/DataFilter.java
index e98a44da..e9120efc 100644
--- a/src/src/main/java/com/relewise/client/model/DataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/DataFilter.java
@@ -117,4 +117,10 @@ public DataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public DataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/DataKeyPopularityMultiplierSelector.java b/src/src/main/java/com/relewise/client/model/DataKeyPopularityMultiplierSelector.java
new file mode 100644
index 00000000..7bc3103b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/DataKeyPopularityMultiplierSelector.java
@@ -0,0 +1,62 @@
+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 selector that uses a Key
to pick a value from an entity's data to change the weighing of an observed view or purchase when making a PopularProductsRequest
. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = DataKeyPopularityMultiplierSelector.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DataKeyPopularityMultiplierSelector extends PopularityMultiplierSelector
+{
+ public String $type = "Relewise.Client.Requests.PopularityMultiplierSelectors.DataKeyPopularityMultiplierSelector, Relewise.Client";
+ /** The data key that will be used to select a factor that is applied to the entities observed views or purchases. */
+ public String key;
+ /**
+ * Creates a selector that uses a Key
to pick a value from an entity's data to change the weighing of an observed view or purchase when making a PopularProductsRequest
.
+ * @param key The data key that will be used to select a factor that is applied to the entities observed views or purchases.
+ */
+ public static DataKeyPopularityMultiplierSelector create(String key)
+ {
+ return new DataKeyPopularityMultiplierSelector(key);
+ }
+ /**
+ * Creates a selector that uses a Key
to pick a value from an entity's data to change the weighing of an observed view or purchase when making a PopularProductsRequest
.
+ * @param key The data key that will be used to select a factor that is applied to the entities observed views or purchases.
+ */
+ public DataKeyPopularityMultiplierSelector(String key)
+ {
+ this.key = key;
+ }
+ public DataKeyPopularityMultiplierSelector()
+ {
+ }
+ /** The data key that will be used to select a factor that is applied to the entities observed views or purchases. */
+ public String getKey()
+ {
+ return this.key;
+ }
+ /** The data key that will be used to select a factor that is applied to the entities observed views or purchases. */
+ public DataKeyPopularityMultiplierSelector setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/DataObjectValueSelector.java b/src/src/main/java/com/relewise/client/model/DataObjectValueSelector.java
index dcee9058..5812557c 100644
--- a/src/src/main/java/com/relewise/client/model/DataObjectValueSelector.java
+++ b/src/src/main/java/com/relewise/client/model/DataObjectValueSelector.java
@@ -24,15 +24,16 @@ public class DataObjectValueSelector
public @Nullable DataObjectFilter filter;
public @Nullable DataObjectValueSelector childSelector;
public @Nullable DataObjectValueSelector fallbackSelector;
- public static DataObjectValueSelector create(String key, @Nullable DataObjectFilter filter, DataObjectValueSelector childSelector)
+ public static DataObjectValueSelector create(String key, @Nullable DataObjectFilter filter, @Nullable DataObjectValueSelector childSelector, DataObjectValueSelector fallbackSelector)
{
- return new DataObjectValueSelector(key, filter, childSelector);
+ return new DataObjectValueSelector(key, filter, childSelector, fallbackSelector);
}
- public DataObjectValueSelector(String key, @Nullable DataObjectFilter filter, DataObjectValueSelector childSelector)
+ public DataObjectValueSelector(String key, @Nullable DataObjectFilter filter, @Nullable DataObjectValueSelector childSelector, DataObjectValueSelector fallbackSelector)
{
this.key = key;
this.filter = filter;
this.childSelector = childSelector;
+ this.fallbackSelector = fallbackSelector;
}
public static DataObjectValueSelector create(String key)
{
diff --git a/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.java
new file mode 100644
index 00000000..f3e6f3f3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/DataRelevanceModifier.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ProductDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductDataRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentDataRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryDataRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryDataRelevanceModifier, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class DataRelevanceModifier extends RelevanceModifier
+{
+ public String $type = "";
+ /** The data key that this RelevanceModifier
will distinguish on. */
+ public String key;
+ /** Specifies whether entities that don't have the specific data Key
should be considered a match (true
) or not (false
). */
+ public Boolean considerAsMatchIfKeyIsNotFound;
+ /** @deprecated Use MultiplierSelector instead */
+ public Double multiplyWeightBy;
+ /** Specifies whether all Conditions
should parse their test on the specific data Key
(true
) or if only one is required (false
). */
+ public Boolean mustMatchAllConditions;
+ /** The conditions that must hold for the specific data Key
in order for the entity to be boosted. */
+ public ArrayList 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. */
+ public ValueSelector multiplierSelector;
+ /** The data key that this RelevanceModifier
will distinguish on. */
+ public String getKey()
+ {
+ return this.key;
+ }
+ /** Specifies whether entities that don't have the specific data Key
should be considered a match (true
) or not (false
). */
+ public Boolean getConsiderAsMatchIfKeyIsNotFound()
+ {
+ return this.considerAsMatchIfKeyIsNotFound;
+ }
+ /** @deprecated Use MultiplierSelector instead */
+ public Double getMultiplyWeightBy()
+ {
+ return this.multiplyWeightBy;
+ }
+ /** Specifies whether all Conditions
should parse their test on the specific data Key
(true
) or if only one is required (false
). */
+ public Boolean getMustMatchAllConditions()
+ {
+ return this.mustMatchAllConditions;
+ }
+ /** The conditions that must hold for the specific data Key
in order for the entity to be boosted. */
+ public ArrayList getConditions()
+ {
+ return this.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. */
+ public ValueSelector getMultiplierSelector()
+ {
+ return this.multiplierSelector;
+ }
+ /** The data key that this RelevanceModifier
will distinguish on. */
+ public DataRelevanceModifier setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ /** Specifies whether entities that don't have the specific data Key
should be considered a match (true
) or not (false
). */
+ public DataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ return this;
+ }
+ /** @deprecated Use MultiplierSelector instead */
+ public DataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ return this;
+ }
+ /** Specifies whether all Conditions
should parse their test on the specific data Key
(true
) or if only one is required (false
). */
+ public DataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
+ {
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ return this;
+ }
+ /** The conditions that must hold for the specific data Key
in order for the entity to be boosted. */
+ public DataRelevanceModifier setConditions(ValueCondition... conditions)
+ {
+ this.conditions = new ArrayList<>(Arrays.asList(conditions));;
+ return this;
+ }
+ /** The conditions that must hold for the specific data Key
in order for the entity to be boosted. */
+ public DataRelevanceModifier addToConditions(ValueCondition conditions)
+ {
+ if (this.conditions == null)
+ {
+ this.conditions = new ArrayList<>();
+ }
+ this.conditions.add(conditions);
+ return this;
+ }
+ /** 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. */
+ public DataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
+ {
+ this.multiplierSelector = multiplierSelector;
+ return this;
+ }
+ @Override
+ public DataRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/DecompoundRule.java b/src/src/main/java/com/relewise/client/model/DecompoundRule.java
index 5b10b722..74a19caa 100644
--- a/src/src/main/java/com/relewise/client/model/DecompoundRule.java
+++ b/src/src/main/java/com/relewise/client/model/DecompoundRule.java
@@ -25,7 +25,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class DecompoundRule extends SearchRule
{
- public String $type = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.DecompoundRule, Relewise.Client";
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.DecompoundRule, Relewise.Client";
public String word;
public @Nullable String head;
public @Nullable String[] modifiers;
diff --git a/src/src/main/java/com/relewise/client/model/DecompoundRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/DecompoundRuleSaveSearchRulesRequest.java
index 3cabd52b..fed8dffc 100644
--- a/src/src/main/java/com/relewise/client/model/DecompoundRuleSaveSearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/DecompoundRuleSaveSearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class DecompoundRuleSaveSearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/DecompoundRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/DecompoundRuleSearchRulesResponse.java
index 9552cf90..88f02ad5 100644
--- a/src/src/main/java/com/relewise/client/model/DecompoundRuleSearchRulesResponse.java
+++ b/src/src/main/java/com/relewise/client/model/DecompoundRuleSearchRulesResponse.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class DecompoundRuleSearchRulesResponse extends TimedResponse
diff --git a/src/src/main/java/com/relewise/client/model/DecompoundRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/DecompoundRulesRequestSortBySearchRulesRequest.java
index 5e51cd57..3237d40e 100644
--- a/src/src/main/java/com/relewise/client/model/DecompoundRulesRequestSortBySearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/DecompoundRulesRequestSortBySearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class DecompoundRulesRequestSortBySearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/Decrease.java b/src/src/main/java/com/relewise/client/model/Decrease.java
new file mode 100644
index 00000000..a9e33900
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Decrease.java
@@ -0,0 +1,37 @@
+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;
+
+/** Indicates that some property should change by decreasing in value. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = Decrease.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Decrease implements IChange
+{
+ public String $type = "Relewise.Client.DataTypes.Changes.Decrease, Relewise.Client";
+ public static Decrease create()
+ {
+ return new Decrease();
+ }
+ public Decrease()
+ {
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/DeleteSearchResultModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/DeleteSearchResultModifierRulesRequest.java
new file mode 100644
index 00000000..1ee9673a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/DeleteSearchResultModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = DeleteSearchResultModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DeleteSearchResultModifierRulesRequest extends DeleteSearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.DeleteSearchResultModifierRulesRequest, Relewise.Client";
+ public static DeleteSearchResultModifierRulesRequest create(UUID[] ids, String deletedBy)
+ {
+ return new DeleteSearchResultModifierRulesRequest(ids, deletedBy);
+ }
+ public DeleteSearchResultModifierRulesRequest(UUID[] ids, String deletedBy)
+ {
+ this.ids = ids;
+ this.deletedBy = deletedBy;
+ }
+ public DeleteSearchResultModifierRulesRequest()
+ {
+ }
+ @Override
+ public DeleteSearchResultModifierRulesRequest setIds(UUID... ids)
+ {
+ this.ids = ids;
+ return this;
+ }
+ public DeleteSearchResultModifierRulesRequest addToIds(UUID id)
+ {
+ if (this.ids == null)
+ {
+ this.ids = new UUID[] { id };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.ids));
+ existingList.add(id);
+ this.ids = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ @Override
+ public DeleteSearchResultModifierRulesRequest setDeletedBy(String deletedBy)
+ {
+ this.deletedBy = deletedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/DeleteSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/DeleteSearchRulesRequest.java
index 28f7fda3..9e64515c 100644
--- a/src/src/main/java/com/relewise/client/model/DeleteSearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/DeleteSearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = DeleteRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DeleteRedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DeleteDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DeleteDecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DeleteStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DeleteStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = DeleteSearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DeleteSearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = DeleteSearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DeleteSearchResultModifierRulesRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class DeleteSearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/DeleteSearchTermModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/DeleteSearchTermModifierRulesRequest.java
new file mode 100644
index 00000000..98785a78
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/DeleteSearchTermModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = DeleteSearchTermModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DeleteSearchTermModifierRulesRequest extends DeleteSearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.DeleteSearchTermModifierRulesRequest, Relewise.Client";
+ public static DeleteSearchTermModifierRulesRequest create(UUID[] ids, String deletedBy)
+ {
+ return new DeleteSearchTermModifierRulesRequest(ids, deletedBy);
+ }
+ public DeleteSearchTermModifierRulesRequest(UUID[] ids, String deletedBy)
+ {
+ this.ids = ids;
+ this.deletedBy = deletedBy;
+ }
+ public DeleteSearchTermModifierRulesRequest()
+ {
+ }
+ @Override
+ public DeleteSearchTermModifierRulesRequest setIds(UUID... ids)
+ {
+ this.ids = ids;
+ return this;
+ }
+ public DeleteSearchTermModifierRulesRequest addToIds(UUID id)
+ {
+ if (this.ids == null)
+ {
+ this.ids = new UUID[] { id };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.ids));
+ existingList.add(id);
+ this.ids = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ @Override
+ public DeleteSearchTermModifierRulesRequest setDeletedBy(String deletedBy)
+ {
+ this.deletedBy = deletedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/EntitiesRequest.java b/src/src/main/java/com/relewise/client/model/EntitiesRequest.java
new file mode 100644
index 00000000..8a6f907f
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/EntitiesRequest.java
@@ -0,0 +1,73 @@
+package com.relewise.client.model;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class EntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public @Nullable AdvertisersRequestEntityFilters filters;
+ public @Nullable AdvertisersRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public @Nullable AdvertisersRequestEntityFilters getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable AdvertisersRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public EntitiesRequest setFilters(AdvertisersRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public EntitiesRequest setSorting(AdvertisersRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public EntitiesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public EntitiesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/EntityChangeTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/EntityChangeTriggerConfiguration.java
new file mode 100644
index 00000000..b7ab24f3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/EntityChangeTriggerConfiguration.java
@@ -0,0 +1,179 @@
+package com.relewise.client.model;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class EntityChangeTriggerConfiguration extends ProductChangeTriggerResultTriggerConfiguration
+{
+ public String $type = "";
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable ProductPropertySelector entityPropertySelector;
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection beforeChangeFilters;
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection afterChangeFilters;
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange change;
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable ProductChangeTriggerResultSettings resultSettings;
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable ProductPropertySelector getEntityPropertySelector()
+ {
+ return this.entityPropertySelector;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection getBeforeChangeFilters()
+ {
+ return this.beforeChangeFilters;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection getAfterChangeFilters()
+ {
+ return this.afterChangeFilters;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange getChange()
+ {
+ return this.change;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable ProductChangeTriggerResultSettings getResultSettings()
+ {
+ return this.resultSettings;
+ }
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public EntityChangeTriggerConfiguration setEntityPropertySelector(ProductPropertySelector entityPropertySelector)
+ {
+ this.entityPropertySelector = entityPropertySelector;
+ return this;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public EntityChangeTriggerConfiguration setBeforeChangeFilters(FilterCollection beforeChangeFilters)
+ {
+ this.beforeChangeFilters = beforeChangeFilters;
+ return this;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public EntityChangeTriggerConfiguration setAfterChangeFilters(FilterCollection afterChangeFilters)
+ {
+ this.afterChangeFilters = afterChangeFilters;
+ return this;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public EntityChangeTriggerConfiguration setChange(IChange change)
+ {
+ this.change = change;
+ return this;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public EntityChangeTriggerConfiguration setResultSettings(ProductChangeTriggerResultSettings resultSettings)
+ {
+ this.resultSettings = resultSettings;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public EntityChangeTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public EntityChangeTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/EntityChangeTriggerResult.java b/src/src/main/java/com/relewise/client/model/EntityChangeTriggerResult.java
new file mode 100644
index 00000000..1608c163
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/EntityChangeTriggerResult.java
@@ -0,0 +1,40 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class EntityChangeTriggerResult implements ITriggerResult
+{
+ public String $type = "";
+ public UserResultDetails user;
+ public UserResultDetails getUser()
+ {
+ return this.user;
+ }
+ public EntityChangeTriggerResult setUser(UserResultDetails user)
+ {
+ this.user = user;
+ return this;
+ }
+}
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 6de515fd..b60a9665 100644
--- a/src/src/main/java/com/relewise/client/model/Facet.java
+++ b/src/src/main/java/com/relewise/client/model/Facet.java
@@ -56,6 +56,7 @@
@JsonSubTypes.Type(value = DataObjectFacet.class, name = "Relewise.Client.DataTypes.Search.Facets.Queries.DataObjectFacet, Relewise.Client"),
@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"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class Facet
diff --git a/src/src/main/java/com/relewise/client/model/FacetQuery.java b/src/src/main/java/com/relewise/client/model/FacetQuery.java
new file mode 100644
index 00000000..15965177
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/FacetQuery.java
@@ -0,0 +1,30 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class FacetQuery
+{
+ public String $type = "";
+}
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 b7847309..2e8188cb 100644
--- a/src/src/main/java/com/relewise/client/model/FacetResult.java
+++ b/src/src/main/java/com/relewise/client/model/FacetResult.java
@@ -54,6 +54,7 @@
@JsonSubTypes.Type(value = DataObjectDoubleRangeFacetResult.class, name = "Relewise.Client.DataTypes.Search.Facets.Result.DataObjectDoubleRangeFacetResult, Relewise.Client"),
@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"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class FacetResult
diff --git a/src/src/main/java/com/relewise/client/model/FacetSettings.java b/src/src/main/java/com/relewise/client/model/FacetSettings.java
index 84dedbec..810417ac 100644
--- a/src/src/main/java/com/relewise/client/model/FacetSettings.java
+++ b/src/src/main/java/com/relewise/client/model/FacetSettings.java
@@ -21,6 +21,7 @@
public class FacetSettings
{
public Boolean alwaysIncludeSelectedInAvailable;
+ public Boolean includeZeroHitsInAvailable;
public static FacetSettings create()
{
return new FacetSettings();
@@ -32,9 +33,18 @@ public Boolean getAlwaysIncludeSelectedInAvailable()
{
return this.alwaysIncludeSelectedInAvailable;
}
+ public Boolean getIncludeZeroHitsInAvailable()
+ {
+ return this.includeZeroHitsInAvailable;
+ }
public FacetSettings setAlwaysIncludeSelectedInAvailable(Boolean alwaysIncludeSelectedInAvailable)
{
this.alwaysIncludeSelectedInAvailable = alwaysIncludeSelectedInAvailable;
return this;
}
+ public FacetSettings setIncludeZeroHitsInAvailable(Boolean includeZeroHitsInAvailable)
+ {
+ this.includeZeroHitsInAvailable = includeZeroHitsInAvailable;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/FieldIndexConfiguration.java b/src/src/main/java/com/relewise/client/model/FieldIndexConfiguration.java
index 43ef8df9..2776c7de 100644
--- a/src/src/main/java/com/relewise/client/model/FieldIndexConfiguration.java
+++ b/src/src/main/java/com/relewise/client/model/FieldIndexConfiguration.java
@@ -24,6 +24,7 @@ public class FieldIndexConfiguration
public Short weight;
public PredictionSourceType predictionSourceType;
public @Nullable Parser parser;
+ public @Nullable MatchTypeSettings matchTypeSettings;
public static FieldIndexConfiguration create(Boolean included, Short weight, PredictionSourceType predictionSourceType, Parser parser)
{
return new FieldIndexConfiguration(included, weight, predictionSourceType, parser);
@@ -34,6 +35,19 @@ public FieldIndexConfiguration(Boolean included, Short weight, PredictionSourceT
this.weight = weight;
this.predictionSourceType = predictionSourceType;
this.parser = parser;
+ this.matchTypeSettings = null;
+ }
+ public static FieldIndexConfiguration create(Boolean included, Short weight, PredictionSourceType predictionSourceType, Parser parser, MatchTypeSettings matchTypeSettings)
+ {
+ return new FieldIndexConfiguration(included, weight, predictionSourceType, parser, matchTypeSettings);
+ }
+ public FieldIndexConfiguration(Boolean included, Short weight, PredictionSourceType predictionSourceType, Parser parser, MatchTypeSettings matchTypeSettings)
+ {
+ this.included = included;
+ this.weight = weight;
+ this.predictionSourceType = predictionSourceType;
+ this.parser = parser;
+ this.matchTypeSettings = matchTypeSettings;
}
public static FieldIndexConfiguration create(Boolean included, Short weight, PredictionSourceType predictionSourceType)
{
@@ -44,9 +58,22 @@ public FieldIndexConfiguration(Boolean included, Short weight, PredictionSourceT
this.included = included;
this.weight = weight;
this.predictionSourceType = predictionSourceType;
+ this.matchTypeSettings = null;
+ }
+ public static FieldIndexConfiguration create(Boolean included, Short weight, PredictionSourceType predictionSourceType, MatchTypeSettings matchTypeSettings)
+ {
+ return new FieldIndexConfiguration(included, weight, predictionSourceType, matchTypeSettings);
+ }
+ public FieldIndexConfiguration(Boolean included, Short weight, PredictionSourceType predictionSourceType, MatchTypeSettings matchTypeSettings)
+ {
+ this.included = included;
+ this.weight = weight;
+ this.predictionSourceType = predictionSourceType;
+ this.matchTypeSettings = matchTypeSettings;
}
public FieldIndexConfiguration()
{
+ this.matchTypeSettings = null;
}
public Boolean getIncluded()
{
@@ -64,6 +91,10 @@ public PredictionSourceType getPredictionSourceType()
{
return this.parser;
}
+ public @Nullable MatchTypeSettings getMatchTypeSettings()
+ {
+ return this.matchTypeSettings;
+ }
public FieldIndexConfiguration setIncluded(Boolean included)
{
this.included = included;
@@ -84,4 +115,9 @@ public FieldIndexConfiguration setParser(Parser parser)
this.parser = parser;
return this;
}
+ public FieldIndexConfiguration setMatchTypeSettings(MatchTypeSettings matchTypeSettings)
+ {
+ this.matchTypeSettings = matchTypeSettings;
+ return this;
+ }
}
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 7ea233c7..514af522 100644
--- a/src/src/main/java/com/relewise/client/model/Filter.java
+++ b/src/src/main/java/com/relewise/client/model/Filter.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a Filter
that can be used to define which entities to include in queries. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -60,19 +61,62 @@
@JsonSubTypes.Type(value = ContentCategoryLevelFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryLevelFilter, Relewise.Client"),
@JsonSubTypes.Type(value = ProductCategoryHasAncestorFilter.class, name = "Relewise.Client.Requests.Filters.ProductCategoryHasAncestorFilter, Relewise.Client"),
@JsonSubTypes.Type(value = ContentCategoryHasAncestorFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryHasAncestorFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentAssortmentFilter.class, name = "Relewise.Client.Requests.Filters.ContentAssortmentFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryHasProductsFilter.class, name = "Relewise.Client.Requests.Filters.ProductCategoryHasProductsFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryHasContentsFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryHasContentsFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = CompanyIdFilter.class, name = "Relewise.Client.Requests.Filters.CompanyIdFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = CompanyDataFilter.class, name = "Relewise.Client.Requests.Filters.CompanyDataFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByUserCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByUserCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyPurchasedByUserCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByUserCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyPurchasedByCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentRecentlyViewedByUserFilter.class, name = "Relewise.Client.Requests.Filters.ContentRecentlyViewedByUserFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryRecentlyViewedByUserFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryRecentlyViewedByUserFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryRecentlyViewedByUserFilter.class, name = "Relewise.Client.Requests.Filters.ProductCategoryRecentlyViewedByUserFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByUserParentCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByUserParentCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyPurchasedByUserParentCompanyFilter.class, name = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByUserParentCompanyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductDisabledFilter.class, name = "Relewise.Client.Requests.Filters.ProductDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentDisabledFilter.class, name = "Relewise.Client.Requests.Filters.ContentDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = VariantDisabledFilter.class, name = "Relewise.Client.Requests.Filters.VariantDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = BrandDisabledFilter.class, name = "Relewise.Client.Requests.Filters.BrandDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryDisabledFilter.class, name = "Relewise.Client.Requests.Filters.ProductCategoryDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryDisabledFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = CompanyDisabledFilter.class, name = "Relewise.Client.Requests.Filters.CompanyDisabledFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.ProductDataHasKeyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.ContentDataHasKeyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = VariantDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.VariantDataHasKeyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = BrandDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.BrandDataHasKeyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.ProductCategoryDataHasKeyFilter, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryDataHasKeyFilter.class, name = "Relewise.Client.Requests.Filters.ContentCategoryDataHasKeyFilter, Relewise.Client"),
+ @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"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class Filter
{
public String $type = "";
+ /** Defines whether the Filter
should exclude the matching entities instead of including the matching entities. */
public Boolean negated;
+ public @Nullable FilterSettings settings;
+ /** Defines whether the Filter
should exclude the matching entities instead of including the matching entities. */
public Boolean getNegated()
{
return this.negated;
}
+ public @Nullable FilterSettings getSettings()
+ {
+ return this.settings;
+ }
+ /** Defines whether the Filter
should exclude the matching entities instead of including the matching entities. */
public Filter setNegated(Boolean negated)
{
this.negated = negated;
return this;
}
+ public Filter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/FilterScopeSettings.java b/src/src/main/java/com/relewise/client/model/FilterScopeSettings.java
new file mode 100644
index 00000000..7de54e06
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/FilterScopeSettings.java
@@ -0,0 +1,31 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ApplyFilterSettings.class, name = "Relewise.Client.Requests.Filters.Settings.ApplyFilterSettings, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class FilterScopeSettings
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/FilterScopes.java b/src/src/main/java/com/relewise/client/model/FilterScopes.java
new file mode 100644
index 00000000..9c9d752a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/FilterScopes.java
@@ -0,0 +1,51 @@
+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 FilterScopes
+{
+ public @Nullable FilterScopeSettings _default;
+ public @Nullable FilterScopeSettings fill;
+ public static FilterScopes create()
+ {
+ return new FilterScopes();
+ }
+ public FilterScopes()
+ {
+ }
+ @JsonProperty("default")
+ public @Nullable FilterScopeSettings getDefault()
+ {
+ return this._default;
+ }
+ public @Nullable FilterScopeSettings getFill()
+ {
+ return this.fill;
+ }
+ public FilterScopes setDefault(FilterScopeSettings _default)
+ {
+ this._default = _default;
+ return this;
+ }
+ public FilterScopes setFill(FilterScopeSettings fill)
+ {
+ this.fill = fill;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/FilterSettings.java b/src/src/main/java/com/relewise/client/model/FilterSettings.java
new file mode 100644
index 00000000..59afe63d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/FilterSettings.java
@@ -0,0 +1,40 @@
+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 FilterSettings
+{
+ public @Nullable FilterScopes scopes;
+ public static FilterSettings create()
+ {
+ return new FilterSettings();
+ }
+ public FilterSettings()
+ {
+ }
+ public @Nullable FilterScopes getScopes()
+ {
+ return this.scopes;
+ }
+ public FilterSettings setScopes(FilterScopes scopes)
+ {
+ this.scopes = scopes;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/FilteredVariantsSettings.java b/src/src/main/java/com/relewise/client/model/FilteredVariantsSettings.java
new file mode 100644
index 00000000..fb3b5c30
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/FilteredVariantsSettings.java
@@ -0,0 +1,50 @@
+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 FilteredVariantsSettings
+{
+ public @Nullable FilterCollection filters;
+ public @Nullable Boolean inheritFiltersFromRequest;
+ public static FilteredVariantsSettings create()
+ {
+ return new FilteredVariantsSettings();
+ }
+ public FilteredVariantsSettings()
+ {
+ }
+ public @Nullable FilterCollection getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable Boolean getInheritFiltersFromRequest()
+ {
+ return this.inheritFiltersFromRequest;
+ }
+ public FilteredVariantsSettings setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public FilteredVariantsSettings setInheritFiltersFromRequest(@Nullable Boolean inheritFiltersFromRequest)
+ {
+ this.inheritFiltersFromRequest = inheritFiltersFromRequest;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/HasAncestorCategoryFilter.java b/src/src/main/java/com/relewise/client/model/HasAncestorCategoryFilter.java
index dabd81d4..95326c2b 100644
--- a/src/src/main/java/com/relewise/client/model/HasAncestorCategoryFilter.java
+++ b/src/src/main/java/com/relewise/client/model/HasAncestorCategoryFilter.java
@@ -54,4 +54,10 @@ public HasAncestorCategoryFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public HasAncestorCategoryFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/HasChildCategoryFilter.java b/src/src/main/java/com/relewise/client/model/HasChildCategoryFilter.java
index bd4e3671..d4dd6133 100644
--- a/src/src/main/java/com/relewise/client/model/HasChildCategoryFilter.java
+++ b/src/src/main/java/com/relewise/client/model/HasChildCategoryFilter.java
@@ -54,4 +54,10 @@ public HasChildCategoryFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public HasChildCategoryFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/HasParentCategoryFilter.java b/src/src/main/java/com/relewise/client/model/HasParentCategoryFilter.java
index bda630f2..ae34cdf0 100644
--- a/src/src/main/java/com/relewise/client/model/HasParentCategoryFilter.java
+++ b/src/src/main/java/com/relewise/client/model/HasParentCategoryFilter.java
@@ -54,4 +54,10 @@ public HasParentCategoryFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public HasParentCategoryFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/HasValueCondition.java b/src/src/main/java/com/relewise/client/model/HasValueCondition.java
new file mode 100644
index 00000000..2064ceb8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/HasValueCondition.java
@@ -0,0 +1,51 @@
+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 = HasValueCondition.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class HasValueCondition extends ValueCondition
+{
+ public String $type = "Relewise.Client.Requests.Conditions.HasValueCondition, Relewise.Client";
+ public static HasValueCondition create()
+ {
+ return new HasValueCondition();
+ }
+ public HasValueCondition()
+ {
+ this.negated = false;
+ }
+ public static HasValueCondition create(Boolean negated)
+ {
+ return new HasValueCondition(negated);
+ }
+ public HasValueCondition(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public HasValueCondition setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/IChange.java b/src/src/main/java/com/relewise/client/model/IChange.java
new file mode 100644
index 00000000..4df72748
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/IChange.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 IChange
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/ICompanyFilter.java b/src/src/main/java/com/relewise/client/model/ICompanyFilter.java
new file mode 100644
index 00000000..4d991409
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ICompanyFilter.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 ICompanyFilter
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/IContentCategoryRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/IContentCategoryRelevanceModifier.java
new file mode 100644
index 00000000..2dc0c9b6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/IContentCategoryRelevanceModifier.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 IContentCategoryRelevanceModifier
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/IContentRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/IContentRelevanceModifier.java
new file mode 100644
index 00000000..f74ba5ae
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/IContentRelevanceModifier.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 IContentRelevanceModifier
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/IProductCategoryRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/IProductCategoryRelevanceModifier.java
new file mode 100644
index 00000000..2e40b6e8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/IProductCategoryRelevanceModifier.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 IProductCategoryRelevanceModifier
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/ISchedule.java b/src/src/main/java/com/relewise/client/model/ISchedule.java
new file mode 100644
index 00000000..29f42d90
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ISchedule.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 ISchedule
+{
+}
diff --git a/src/src/main/java/com/relewise/client/model/IVariantFilter.java b/src/src/main/java/com/relewise/client/model/IVariantFilter.java
index 67bda226..c8974eed 100644
--- a/src/src/main/java/com/relewise/client/model/IVariantFilter.java
+++ b/src/src/main/java/com/relewise/client/model/IVariantFilter.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a Filter
that can be used to define which variants to include for products in queries. */
public interface IVariantFilter
{
}
diff --git a/src/src/main/java/com/relewise/client/model/Increase.java b/src/src/main/java/com/relewise/client/model/Increase.java
new file mode 100644
index 00000000..6ea69ac5
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Increase.java
@@ -0,0 +1,37 @@
+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;
+
+/** Indicates that some property should change by increasing in value. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = Increase.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Increase implements IChange
+{
+ public String $type = "Relewise.Client.DataTypes.Changes.Increase, Relewise.Client";
+ public static Increase create()
+ {
+ return new Increase();
+ }
+ public Increase()
+ {
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Language.java b/src/src/main/java/com/relewise/client/model/Language.java
index 932730a5..45cbadc5 100644
--- a/src/src/main/java/com/relewise/client/model/Language.java
+++ b/src/src/main/java/com/relewise/client/model/Language.java
@@ -20,6 +20,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class Language
{
+ /** Trimmed language name in lower-invariant. */
public String value;
public static final Language UNDEFINED = null;
public static Language create(String name)
@@ -33,10 +34,12 @@ public Language(String name)
public Language()
{
}
+ /** Trimmed language name in lower-invariant. */
public String getValue()
{
return this.value;
}
+ /** Trimmed language name in lower-invariant. */
public Language setValue(String value)
{
this.value = value;
diff --git a/src/src/main/java/com/relewise/client/model/LineItem.java b/src/src/main/java/com/relewise/client/model/LineItem.java
index 93803608..eebaf49b 100644
--- a/src/src/main/java/com/relewise/client/model/LineItem.java
+++ b/src/src/main/java/com/relewise/client/model/LineItem.java
@@ -24,6 +24,7 @@ public class LineItem
public @Nullable ProductVariant variant;
public Float quantity;
public Double lineTotal;
+ public @Nullable HashMap data;
public static LineItem create(Product product, @Nullable ProductVariant variant, Float quantity, Double lineTotal)
{
return new LineItem(product, variant, quantity, lineTotal);
@@ -35,6 +36,15 @@ public LineItem(Product product, @Nullable ProductVariant variant, Float quantit
this.quantity = quantity;
this.lineTotal = lineTotal;
}
+ public static LineItem create(Product product, Float quantity)
+ {
+ return new LineItem(product, quantity);
+ }
+ public LineItem(Product product, Float quantity)
+ {
+ this.product = product;
+ this.quantity = quantity;
+ }
public LineItem()
{
}
@@ -54,6 +64,10 @@ public Double getLineTotal()
{
return this.lineTotal;
}
+ public @Nullable HashMap getData()
+ {
+ return this.data;
+ }
public LineItem setProduct(Product product)
{
this.product = product;
@@ -74,4 +88,18 @@ public LineItem setLineTotal(Double lineTotal)
this.lineTotal = lineTotal;
return this;
}
+ public LineItem addToData(String key, DataValue value)
+ {
+ if (this.data == null)
+ {
+ this.data = new HashMap<>();
+ }
+ this.data.put(key, value);
+ return this;
+ }
+ public LineItem setData(HashMap data)
+ {
+ this.data = data;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/LocalDateTimeRange.java b/src/src/main/java/com/relewise/client/model/LocalDateTimeRange.java
new file mode 100644
index 00000000..6d3bcff2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocalDateTimeRange.java
@@ -0,0 +1,55 @@
+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 LocalDateTimeRange
+{
+ public LocalDateTime lowerBoundInclusive;
+ public LocalDateTime upperBoundInclusive;
+ public static LocalDateTimeRange create(LocalDateTime lowerBoundInclusive, LocalDateTime upperBoundInclusive)
+ {
+ return new LocalDateTimeRange(lowerBoundInclusive, upperBoundInclusive);
+ }
+ public LocalDateTimeRange(LocalDateTime lowerBoundInclusive, LocalDateTime upperBoundInclusive)
+ {
+ this.lowerBoundInclusive = lowerBoundInclusive;
+ this.upperBoundInclusive = upperBoundInclusive;
+ }
+ public LocalDateTimeRange()
+ {
+ }
+ public LocalDateTime getLowerBoundInclusive()
+ {
+ return this.lowerBoundInclusive;
+ }
+ public LocalDateTime getUpperBoundInclusive()
+ {
+ return this.upperBoundInclusive;
+ }
+ public LocalDateTimeRange setLowerBoundInclusive(LocalDateTime lowerBoundInclusive)
+ {
+ this.lowerBoundInclusive = lowerBoundInclusive;
+ return this;
+ }
+ public LocalDateTimeRange setUpperBoundInclusive(LocalDateTime upperBoundInclusive)
+ {
+ this.upperBoundInclusive = upperBoundInclusive;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Location.java b/src/src/main/java/com/relewise/client/model/Location.java
new file mode 100644
index 00000000..f22ce102
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Location.java
@@ -0,0 +1,125 @@
+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;
+
+/** Represents a location in the system where promotions can be shown, like 'Front Page', as well as Placements
(like 'main zone', or 'power action'). */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = Location.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Location extends LocationEntityStateLocationMetadataValuesRetailMediaEntity
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Location, Relewise.Client";
+ /** The name of this location, e.g. "Front page", "PDP", "Home screen" etc. */
+ public String name;
+ /** A key which is automatically computed based on the name of the location. This will be used as identifier to reference this location when retrieving Retail Media content for it from the consuming client This value gets created the first time the location is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public @Nullable String key;
+ /** The placements where promotions may be displayed at this location If null
or empty, no promotions will be shown at this location */
+ public @Nullable LocationPlacementCollection placements;
+ /** Defines what kinds of promotions are supported by this location */
+ public @Nullable PromotionSpecificationCollection supportedPromotions;
+ public static Location create(@Nullable UUID id, LocationEntityState state, String name, LocationPlacementCollection placements, PromotionSpecificationCollection supportedPromotions)
+ {
+ return new Location(id, state, name, placements, supportedPromotions);
+ }
+ public Location(@Nullable UUID id, LocationEntityState state, String name, LocationPlacementCollection placements, PromotionSpecificationCollection supportedPromotions)
+ {
+ this.id = id;
+ this.state = state;
+ this.name = name;
+ this.placements = placements;
+ this.supportedPromotions = supportedPromotions;
+ }
+ public static Location create(@Nullable UUID id, LocationEntityState state, String name)
+ {
+ return new Location(id, state, name);
+ }
+ public Location(@Nullable UUID id, LocationEntityState state, String name)
+ {
+ this.id = id;
+ this.state = state;
+ this.name = name;
+ }
+ public Location()
+ {
+ }
+ /** The name of this location, e.g. "Front page", "PDP", "Home screen" etc. */
+ public String getName()
+ {
+ return this.name;
+ }
+ /** A key which is automatically computed based on the name of the location. This will be used as identifier to reference this location when retrieving Retail Media content for it from the consuming client This value gets created the first time the location is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public @Nullable String getKey()
+ {
+ return this.key;
+ }
+ /** The placements where promotions may be displayed at this location If null
or empty, no promotions will be shown at this location */
+ public @Nullable LocationPlacementCollection getPlacements()
+ {
+ return this.placements;
+ }
+ /** Defines what kinds of promotions are supported by this location */
+ public @Nullable PromotionSpecificationCollection getSupportedPromotions()
+ {
+ return this.supportedPromotions;
+ }
+ /** The name of this location, e.g. "Front page", "PDP", "Home screen" etc. */
+ public Location setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ /** A key which is automatically computed based on the name of the location. This will be used as identifier to reference this location when retrieving Retail Media content for it from the consuming client This value gets created the first time the location is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public Location setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ /** The placements where promotions may be displayed at this location If null
or empty, no promotions will be shown at this location */
+ public Location setPlacements(LocationPlacementCollection placements)
+ {
+ this.placements = placements;
+ return this;
+ }
+ /** Defines what kinds of promotions are supported by this location */
+ public Location setSupportedPromotions(PromotionSpecificationCollection supportedPromotions)
+ {
+ this.supportedPromotions = supportedPromotions;
+ return this;
+ }
+ @Override
+ public Location setState(LocationEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ @Override
+ public Location setMetadata(LocationMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public Location setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationEntityState.java b/src/src/main/java/com/relewise/client/model/LocationEntityState.java
new file mode 100644
index 00000000..438fbb10
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationEntityState.java
@@ -0,0 +1,37 @@
+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 enum LocationEntityState
+{
+ Active {
+ public String toString() {
+ return "Active";
+ }
+ },
+ Inactive {
+ public String toString() {
+ return "Inactive";
+ }
+ },
+ Archived {
+ public String toString() {
+ return "Archived";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest.java
new file mode 100644
index 00000000..cef6ac23
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest.java
@@ -0,0 +1,70 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public @Nullable LocationsRequestEntityFilters filters;
+ public @Nullable LocationsRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public @Nullable LocationsRequestEntityFilters getFilters()
+ {
+ return this.filters;
+ }
+ public @Nullable LocationsRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest setFilters(LocationsRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest setSorting(LocationsRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntity.java b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntity.java
new file mode 100644
index 00000000..4a1760a7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntity.java
@@ -0,0 +1,59 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationEntityStateLocationMetadataValuesRetailMediaEntity extends RetailMediaEntity
+{
+ public String $type = "";
+ public LocationEntityState state;
+ /** Managed server side only, manually setting this will have no effect */
+ public LocationMetadataValues metadata;
+ public LocationEntityState getState()
+ {
+ return this.state;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public LocationMetadataValues getMetadata()
+ {
+ return this.metadata;
+ }
+ public LocationEntityStateLocationMetadataValuesRetailMediaEntity setState(LocationEntityState state)
+ {
+ this.state = state;
+ return this;
+ }
+ /** Managed server side only, manually setting this will have no effect */
+ public LocationEntityStateLocationMetadataValuesRetailMediaEntity setMetadata(LocationMetadataValues metadata)
+ {
+ this.metadata = metadata;
+ return this;
+ }
+ @Override
+ public LocationEntityStateLocationMetadataValuesRetailMediaEntity setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters.java b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters.java
new file mode 100644
index 00000000..1fe7d2e2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "";
+ public @Nullable String term;
+ public @Nullable LocationEntityState[] states;
+ public @Nullable String getTerm()
+ {
+ return this.term;
+ }
+ public @Nullable LocationEntityState[] getStates()
+ {
+ return this.states;
+ }
+ public LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ public LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters setStates(LocationEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationLocationEntityStateEntityResponse.java b/src/src/main/java/com/relewise/client/model/LocationLocationEntityStateEntityResponse.java
new file mode 100644
index 00000000..d5c3dcad
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationLocationEntityStateEntityResponse.java
@@ -0,0 +1,75 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationLocationEntityStateEntityResponse extends TimedResponse
+{
+ public String $type = "";
+ public Location[] entities;
+ public Integer hits;
+ public HashMap hitsPerState;
+ public Location[] getEntities()
+ {
+ return this.entities;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public HashMap getHitsPerState()
+ {
+ return this.hitsPerState;
+ }
+ public LocationLocationEntityStateEntityResponse setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public LocationLocationEntityStateEntityResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public LocationLocationEntityStateEntityResponse addToHitsPerState(LocationEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ public LocationLocationEntityStateEntityResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public LocationLocationEntityStateEntityResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationMetadataValues.java b/src/src/main/java/com/relewise/client/model/LocationMetadataValues.java
new file mode 100644
index 00000000..1c11dd8d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationMetadataValues.java
@@ -0,0 +1,120 @@
+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 = LocationMetadataValues.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class LocationMetadataValues extends MetadataValues
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.Location+MetadataValues, Relewise.Client";
+ public @Nullable OffsetDateTime inactivated;
+ public @Nullable String inactivatedBy;
+ public @Nullable OffsetDateTime activated;
+ public @Nullable String activatedBy;
+ public @Nullable OffsetDateTime archived;
+ public @Nullable String archivedBy;
+ public static LocationMetadataValues create()
+ {
+ return new LocationMetadataValues();
+ }
+ public LocationMetadataValues()
+ {
+ }
+ public @Nullable OffsetDateTime getInactivated()
+ {
+ return this.inactivated;
+ }
+ public @Nullable String getInactivatedBy()
+ {
+ return this.inactivatedBy;
+ }
+ public @Nullable OffsetDateTime getActivated()
+ {
+ return this.activated;
+ }
+ public @Nullable String getActivatedBy()
+ {
+ return this.activatedBy;
+ }
+ public @Nullable OffsetDateTime getArchived()
+ {
+ return this.archived;
+ }
+ public @Nullable String getArchivedBy()
+ {
+ return this.archivedBy;
+ }
+ public LocationMetadataValues setInactivated(@Nullable OffsetDateTime inactivated)
+ {
+ this.inactivated = inactivated;
+ return this;
+ }
+ public LocationMetadataValues setInactivatedBy(String inactivatedBy)
+ {
+ this.inactivatedBy = inactivatedBy;
+ return this;
+ }
+ public LocationMetadataValues setActivated(@Nullable OffsetDateTime activated)
+ {
+ this.activated = activated;
+ return this;
+ }
+ public LocationMetadataValues setActivatedBy(String activatedBy)
+ {
+ this.activatedBy = activatedBy;
+ return this;
+ }
+ public LocationMetadataValues setArchived(@Nullable OffsetDateTime archived)
+ {
+ this.archived = archived;
+ return this;
+ }
+ public LocationMetadataValues setArchivedBy(String archivedBy)
+ {
+ this.archivedBy = archivedBy;
+ return this;
+ }
+ @Override
+ public LocationMetadataValues setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public LocationMetadataValues setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public LocationMetadataValues setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public LocationMetadataValues setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationPlacement.java b/src/src/main/java/com/relewise/client/model/LocationPlacement.java
new file mode 100644
index 00000000..515e2fc4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationPlacement.java
@@ -0,0 +1,83 @@
+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;
+
+/** Represents a placement within a location in the system where promotions can be shown */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class LocationPlacement
+{
+ /** The name of this placement, e.g. "Top", "Bottom", "Right", "Overlay" etc. */
+ public String name;
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public @Nullable String key;
+ /** The variations of this placement, e.g. to support multiple different views, like Mobile, Tablet, Desktop, Email template etc. If null or empty, no promotions will be shown for this placement */
+ public @Nullable LocationPlacementVariationCollection variations;
+ public static LocationPlacement create(String name, LocationPlacementVariationCollection variations)
+ {
+ return new LocationPlacement(name, variations);
+ }
+ public LocationPlacement(String name, LocationPlacementVariationCollection variations)
+ {
+ this.name = name;
+ this.variations = variations;
+ }
+ public static LocationPlacement create(String name)
+ {
+ return new LocationPlacement(name);
+ }
+ public LocationPlacement(String name)
+ {
+ this.name = name;
+ }
+ public LocationPlacement()
+ {
+ }
+ /** The name of this placement, e.g. "Top", "Bottom", "Right", "Overlay" etc. */
+ public String getName()
+ {
+ return this.name;
+ }
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public @Nullable String getKey()
+ {
+ return this.key;
+ }
+ /** The variations of this placement, e.g. to support multiple different views, like Mobile, Tablet, Desktop, Email template etc. If null or empty, no promotions will be shown for this placement */
+ public @Nullable LocationPlacementVariationCollection getVariations()
+ {
+ return this.variations;
+ }
+ /** The name of this placement, e.g. "Top", "Bottom", "Right", "Overlay" etc. */
+ public LocationPlacement setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public LocationPlacement setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ /** The variations of this placement, e.g. to support multiple different views, like Mobile, Tablet, Desktop, Email template etc. If null or empty, no promotions will be shown for this placement */
+ public LocationPlacement setVariations(LocationPlacementVariationCollection variations)
+ {
+ this.variations = variations;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationPlacementCollection.java b/src/src/main/java/com/relewise/client/model/LocationPlacementCollection.java
new file mode 100644
index 00000000..8daaaf03
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationPlacementCollection.java
@@ -0,0 +1,53 @@
+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 LocationPlacementCollection
+{
+ public ArrayList items;
+ public static LocationPlacementCollection create(LocationPlacement... placements)
+ {
+ return new LocationPlacementCollection(placements);
+ }
+ public LocationPlacementCollection(LocationPlacement... placements)
+ {
+ this.items = new ArrayList<>(Arrays.asList(placements));
+ }
+ public LocationPlacementCollection()
+ {
+ }
+ public ArrayList getItems()
+ {
+ return this.items;
+ }
+ public LocationPlacementCollection setItems(LocationPlacement... items)
+ {
+ this.items = new ArrayList<>(Arrays.asList(items));;
+ return this;
+ }
+ public LocationPlacementCollection addToItems(LocationPlacement items)
+ {
+ if (this.items == null)
+ {
+ this.items = new ArrayList<>();
+ }
+ this.items.add(items);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationPlacementVariation.java b/src/src/main/java/com/relewise/client/model/LocationPlacementVariation.java
new file mode 100644
index 00000000..fea8d0b4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationPlacementVariation.java
@@ -0,0 +1,73 @@
+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 LocationPlacementVariation
+{
+ public String name;
+ public @Nullable String key;
+ public @Nullable PromotionSpecificationVariationCollection supportedPromotions;
+ public static LocationPlacementVariation create(String name, PromotionSpecificationVariationCollection supportedPromotions)
+ {
+ return new LocationPlacementVariation(name, supportedPromotions);
+ }
+ public LocationPlacementVariation(String name, PromotionSpecificationVariationCollection supportedPromotions)
+ {
+ this.name = name;
+ this.supportedPromotions = supportedPromotions;
+ }
+ public static LocationPlacementVariation create(String name)
+ {
+ return new LocationPlacementVariation(name);
+ }
+ public LocationPlacementVariation(String name)
+ {
+ this.name = name;
+ }
+ public LocationPlacementVariation()
+ {
+ }
+ public String getName()
+ {
+ return this.name;
+ }
+ public @Nullable String getKey()
+ {
+ return this.key;
+ }
+ public @Nullable PromotionSpecificationVariationCollection getSupportedPromotions()
+ {
+ return this.supportedPromotions;
+ }
+ public LocationPlacementVariation setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ public LocationPlacementVariation setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ public LocationPlacementVariation setSupportedPromotions(PromotionSpecificationVariationCollection supportedPromotions)
+ {
+ this.supportedPromotions = supportedPromotions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationPlacementVariationCollection.java b/src/src/main/java/com/relewise/client/model/LocationPlacementVariationCollection.java
new file mode 100644
index 00000000..2925e1ca
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationPlacementVariationCollection.java
@@ -0,0 +1,53 @@
+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 LocationPlacementVariationCollection
+{
+ public ArrayList items;
+ public static LocationPlacementVariationCollection create(LocationPlacementVariation... variations)
+ {
+ return new LocationPlacementVariationCollection(variations);
+ }
+ public LocationPlacementVariationCollection(LocationPlacementVariation... variations)
+ {
+ this.items = new ArrayList<>(Arrays.asList(variations));
+ }
+ public LocationPlacementVariationCollection()
+ {
+ }
+ public ArrayList getItems()
+ {
+ return this.items;
+ }
+ public LocationPlacementVariationCollection setItems(LocationPlacementVariation... items)
+ {
+ this.items = new ArrayList<>(Arrays.asList(items));;
+ return this;
+ }
+ public LocationPlacementVariationCollection addToItems(LocationPlacementVariation items)
+ {
+ if (this.items == null)
+ {
+ this.items = new ArrayList<>();
+ }
+ this.items.add(items);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesRequest.java b/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesRequest.java
new file mode 100644
index 00000000..ca7baee8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesRequest.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationSaveEntitiesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public Location[] entities;
+ public String modifiedBy;
+ public Location[] getEntities()
+ {
+ return this.entities;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public LocationSaveEntitiesRequest setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public LocationSaveEntitiesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesResponse.java b/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesResponse.java
new file mode 100644
index 00000000..f2b1b218
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationSaveEntitiesResponse.java
@@ -0,0 +1,46 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class LocationSaveEntitiesResponse extends TimedResponse
+{
+ public String $type = "";
+ public Location[] entities;
+ public Location[] getEntities()
+ {
+ return this.entities;
+ }
+ public LocationSaveEntitiesResponse setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ @Override
+ public LocationSaveEntitiesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationsRequest.java b/src/src/main/java/com/relewise/client/model/LocationsRequest.java
new file mode 100644
index 00000000..ac99d956
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationsRequest.java
@@ -0,0 +1,67 @@
+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 = LocationsRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class LocationsRequest extends LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.LocationsRequest, Relewise.Client";
+ public static LocationsRequest create(@Nullable LocationsRequestEntityFilters filters, @Nullable LocationsRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ return new LocationsRequest(filters, sorting, skip, take);
+ }
+ public LocationsRequest(@Nullable LocationsRequestEntityFilters filters, @Nullable LocationsRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ this.filters = filters;
+ this.sorting = sorting;
+ this.skip = skip;
+ this.take = take;
+ }
+ public LocationsRequest()
+ {
+ }
+ @Override
+ public LocationsRequest setFilters(LocationsRequestEntityFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public LocationsRequest setSorting(LocationsRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ @Override
+ public LocationsRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ @Override
+ public LocationsRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationsRequestEntityFilters.java b/src/src/main/java/com/relewise/client/model/LocationsRequestEntityFilters.java
new file mode 100644
index 00000000..b56d06df
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationsRequestEntityFilters.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = LocationsRequestEntityFilters.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class LocationsRequestEntityFilters extends LocationEntityStateLocationMetadataValuesRetailMediaEntityEntityFilters
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.LocationsRequest+EntityFilters, Relewise.Client";
+ public @Nullable UUID[] ids;
+ public @Nullable String[] keys;
+ public static LocationsRequestEntityFilters create()
+ {
+ return new LocationsRequestEntityFilters();
+ }
+ public LocationsRequestEntityFilters()
+ {
+ }
+ public @Nullable UUID[] getIds()
+ {
+ return this.ids;
+ }
+ public @Nullable String[] getKeys()
+ {
+ return this.keys;
+ }
+ public LocationsRequestEntityFilters setIds(UUID... ids)
+ {
+ this.ids = ids;
+ return this;
+ }
+ public LocationsRequestEntityFilters addToIds(UUID id)
+ {
+ if (this.ids == null)
+ {
+ this.ids = new UUID[] { id };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.ids));
+ existingList.add(id);
+ this.ids = existingList.toArray(new UUID[0]);
+ }
+ return this;
+ }
+ public LocationsRequestEntityFilters setKeys(String... keys)
+ {
+ this.keys = keys;
+ return this;
+ }
+ public LocationsRequestEntityFilters addToKeys(String key)
+ {
+ if (this.keys == null)
+ {
+ this.keys = new String[] { key };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.keys));
+ existingList.add(key);
+ this.keys = existingList.toArray(new String[0]);
+ }
+ return this;
+ }
+ @Override
+ public LocationsRequestEntityFilters setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ @Override
+ public LocationsRequestEntityFilters setStates(LocationEntityState... states)
+ {
+ this.states = states;
+ return this;
+ }
+ public LocationsRequestEntityFilters addToStates(LocationEntityState state)
+ {
+ if (this.states == null)
+ {
+ this.states = new LocationEntityState[] { state };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.states));
+ existingList.add(state);
+ this.states = existingList.toArray(new LocationEntityState[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationsRequestSortBy.java b/src/src/main/java/com/relewise/client/model/LocationsRequestSortBy.java
new file mode 100644
index 00000000..74e63b42
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationsRequestSortBy.java
@@ -0,0 +1,37 @@
+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 enum LocationsRequestSortBy
+{
+ Created {
+ public String toString() {
+ return "Created";
+ }
+ },
+ Modified {
+ public String toString() {
+ return "Modified";
+ }
+ },
+ Name {
+ public String toString() {
+ return "Name";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationsRequestSortBySorting.java b/src/src/main/java/com/relewise/client/model/LocationsRequestSortBySorting.java
new file mode 100644
index 00000000..ce946ee1
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationsRequestSortBySorting.java
@@ -0,0 +1,55 @@
+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 LocationsRequestSortBySorting
+{
+ public LocationsRequestSortBy sortBy;
+ public SortOrder sortOrder;
+ public static LocationsRequestSortBySorting create(LocationsRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ return new LocationsRequestSortBySorting(sortBy, sortOrder);
+ }
+ public LocationsRequestSortBySorting(LocationsRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ this.sortBy = sortBy;
+ this.sortOrder = sortOrder;
+ }
+ public LocationsRequestSortBySorting()
+ {
+ }
+ public LocationsRequestSortBy getSortBy()
+ {
+ return this.sortBy;
+ }
+ public SortOrder getSortOrder()
+ {
+ return this.sortOrder;
+ }
+ public LocationsRequestSortBySorting setSortBy(LocationsRequestSortBy sortBy)
+ {
+ this.sortBy = sortBy;
+ return this;
+ }
+ public LocationsRequestSortBySorting setSortOrder(SortOrder sortOrder)
+ {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/LocationsResponse.java b/src/src/main/java/com/relewise/client/model/LocationsResponse.java
new file mode 100644
index 00000000..0d4814c7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/LocationsResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = LocationsResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class LocationsResponse extends LocationLocationEntityStateEntityResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.LocationsResponse, Relewise.Client";
+ public static LocationsResponse create(Location[] locations, Integer hits, HashMap hitsPerState)
+ {
+ return new LocationsResponse(locations, hits, hitsPerState);
+ }
+ public LocationsResponse(Location[] locations, Integer hits, HashMap hitsPerState)
+ {
+ this.entities = locations;
+ this.hits = hits;
+ this.hitsPerState = hitsPerState;
+ }
+ public LocationsResponse()
+ {
+ }
+ @Override
+ public LocationsResponse setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public LocationsResponse addToEntities(Location entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Location[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Location[0]);
+ }
+ return this;
+ }
+ @Override
+ public LocationsResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ public LocationsResponse addToHitsPerState(LocationEntityState key, Integer value)
+ {
+ if (this.hitsPerState == null)
+ {
+ this.hitsPerState = new HashMap<>();
+ }
+ this.hitsPerState.put(key, value);
+ return this;
+ }
+ @Override
+ public LocationsResponse setHitsPerState(HashMap hitsPerState)
+ {
+ this.hitsPerState = hitsPerState;
+ return this;
+ }
+ @Override
+ public LocationsResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/MatchTypeSettings.java b/src/src/main/java/com/relewise/client/model/MatchTypeSettings.java
new file mode 100644
index 00000000..8c1c6ffc
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/MatchTypeSettings.java
@@ -0,0 +1,80 @@
+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 MatchTypeSettings
+{
+ public Boolean compound;
+ public Boolean exact;
+ public Boolean startsWith;
+ public Boolean endsWith;
+ public Boolean fuzzy;
+ public static MatchTypeSettings create()
+ {
+ return new MatchTypeSettings();
+ }
+ public MatchTypeSettings()
+ {
+ }
+ public Boolean getCompound()
+ {
+ return this.compound;
+ }
+ public Boolean getExact()
+ {
+ return this.exact;
+ }
+ public Boolean getStartsWith()
+ {
+ return this.startsWith;
+ }
+ public Boolean getEndsWith()
+ {
+ return this.endsWith;
+ }
+ public Boolean getFuzzy()
+ {
+ return this.fuzzy;
+ }
+ public MatchTypeSettings setCompound(Boolean compound)
+ {
+ this.compound = compound;
+ return this;
+ }
+ public MatchTypeSettings setExact(Boolean exact)
+ {
+ this.exact = exact;
+ return this;
+ }
+ public MatchTypeSettings setStartsWith(Boolean startsWith)
+ {
+ this.startsWith = startsWith;
+ return this;
+ }
+ public MatchTypeSettings setEndsWith(Boolean endsWith)
+ {
+ this.endsWith = endsWith;
+ return this;
+ }
+ public MatchTypeSettings setFuzzy(Boolean fuzzy)
+ {
+ this.fuzzy = fuzzy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/MetadataValues.java b/src/src/main/java/com/relewise/client/model/MetadataValues.java
new file mode 100644
index 00000000..65be4b0b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/MetadataValues.java
@@ -0,0 +1,70 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class MetadataValues
+{
+ public String $type = "";
+ public OffsetDateTime created;
+ public String createdBy;
+ public OffsetDateTime modified;
+ public String modifiedBy;
+ public OffsetDateTime getCreated()
+ {
+ return this.created;
+ }
+ public String getCreatedBy()
+ {
+ return this.createdBy;
+ }
+ public OffsetDateTime getModified()
+ {
+ return this.modified;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public MetadataValues setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ public MetadataValues setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ public MetadataValues setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ public MetadataValues setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
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 2261b2dd..a1b67f99 100644
--- a/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java
+++ b/src/src/main/java/com/relewise/client/model/ObjectValueCondition.java
@@ -29,41 +29,52 @@
@JsonSubTypes.Type(value = ObjectValueInRangeCondition.class, name = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueInRangeCondition, Relewise.Client"),
@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"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class ObjectValueCondition
{
public String $type = "";
+ /** Whether the condition should be negated / inverted */
public Boolean negated;
+ /** The key of the object that the condition will compare against. */
public String key;
+ /** An optional path to some nested object defined under the selected Key
. */
public @Nullable String[] objectPath;
+ /** Whether the condition should be negated / inverted */
public Boolean getNegated()
{
return this.negated;
}
+ /** The key of the object that the condition will compare against. */
public String getKey()
{
return this.key;
}
+ /** An optional path to some nested object defined under the selected Key
. */
public @Nullable String[] getObjectPath()
{
return this.objectPath;
}
+ /** Whether the condition should be negated / inverted */
public ObjectValueCondition setNegated(Boolean negated)
{
this.negated = negated;
return this;
}
+ /** The key of the object that the condition will compare against. */
public ObjectValueCondition setKey(String key)
{
this.key = key;
return this;
}
+ /** An optional path to some nested object defined under the selected Key
. */
public ObjectValueCondition setObjectPath(String... objectPath)
{
this.objectPath = objectPath;
return this;
}
+ /** An optional path to some nested object defined under the selected Key
. */
public ObjectValueCondition addToObjectPath(String objectPath)
{
if (this.objectPath == null)
diff --git a/src/src/main/java/com/relewise/client/model/ObjectValueRelativeDateTimeCondition.java b/src/src/main/java/com/relewise/client/model/ObjectValueRelativeDateTimeCondition.java
new file mode 100644
index 00000000..03905a72
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObjectValueRelativeDateTimeCondition.java
@@ -0,0 +1,190 @@
+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 ObjectValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ObjectValueRelativeDateTimeCondition.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ObjectValueRelativeDateTimeCondition extends ObjectValueCondition
+{
+ public String $type = "Relewise.Client.Requests.Filters.DataObjects.Conditions.ObjectValueRelativeDateTimeCondition, Relewise.Client";
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public RelativeTimeComparison comparison;
+ /** Defines the time unit that the compared value is defined in. */
+ public TimeUnit unit;
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public Long currentTimeOffset;
+ public static ObjectValueRelativeDateTimeCondition create(String key, String[] objectPath, RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ return new ObjectValueRelativeDateTimeCondition(key, objectPath, comparison, unit);
+ }
+ public ObjectValueRelativeDateTimeCondition(String key, String[] objectPath, RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ this.key = key;
+ this.objectPath = objectPath;
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = 0L;
+ this.negated = false;
+ }
+ /**
+ * Creates a ObjectValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param key The key of the object that the condition will compare against.
+ * @param objectPath An optional path to some nested object defined under the selected Key.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public static ObjectValueRelativeDateTimeCondition create(String key, String[] objectPath, RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ return new ObjectValueRelativeDateTimeCondition(key, objectPath, comparison, unit, currentTimeOffset, negated);
+ }
+ /**
+ * Creates a ObjectValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param key The key of the object that the condition will compare against.
+ * @param objectPath An optional path to some nested object defined under the selected Key.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public ObjectValueRelativeDateTimeCondition(String key, String[] objectPath, RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ this.key = key;
+ this.objectPath = objectPath;
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = currentTimeOffset;
+ this.negated = negated;
+ }
+ public static ObjectValueRelativeDateTimeCondition create(String key, RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ return new ObjectValueRelativeDateTimeCondition(key, comparison, unit);
+ }
+ public ObjectValueRelativeDateTimeCondition(String key, RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ this.key = key;
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = 0L;
+ this.negated = false;
+ }
+ /**
+ * Creates a ObjectValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param key The key of the object that the condition will compare against.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public static ObjectValueRelativeDateTimeCondition create(String key, RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ return new ObjectValueRelativeDateTimeCondition(key, comparison, unit, currentTimeOffset, negated);
+ }
+ /**
+ * Creates a ObjectValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param key The key of the object that the condition will compare against.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public ObjectValueRelativeDateTimeCondition(String key, RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ this.key = key;
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = currentTimeOffset;
+ this.negated = negated;
+ }
+ public ObjectValueRelativeDateTimeCondition()
+ {
+ this.currentTimeOffset = 0L;
+ this.negated = false;
+ }
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public RelativeTimeComparison getComparison()
+ {
+ return this.comparison;
+ }
+ /** Defines the time unit that the compared value is defined in. */
+ public TimeUnit getUnit()
+ {
+ return this.unit;
+ }
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public Long getCurrentTimeOffset()
+ {
+ return this.currentTimeOffset;
+ }
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public ObjectValueRelativeDateTimeCondition setComparison(RelativeTimeComparison comparison)
+ {
+ this.comparison = comparison;
+ return this;
+ }
+ /** Defines the time unit that the compared value is defined in. */
+ public ObjectValueRelativeDateTimeCondition setUnit(TimeUnit unit)
+ {
+ this.unit = unit;
+ return this;
+ }
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public ObjectValueRelativeDateTimeCondition setCurrentTimeOffset(Long currentTimeOffset)
+ {
+ this.currentTimeOffset = currentTimeOffset;
+ return this;
+ }
+ @Override
+ public ObjectValueRelativeDateTimeCondition setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ObjectValueRelativeDateTimeCondition setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ObjectValueRelativeDateTimeCondition setObjectPath(String... objectPath)
+ {
+ this.objectPath = objectPath;
+ return this;
+ }
+ public ObjectValueRelativeDateTimeCondition 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/ObservableProductAttribute.java b/src/src/main/java/com/relewise/client/model/ObservableProductAttribute.java
new file mode 100644
index 00000000..15793396
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableProductAttribute.java
@@ -0,0 +1,32 @@
+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 enum ObservableProductAttribute
+{
+ ListPrice {
+ public String toString() {
+ return "ListPrice";
+ }
+ },
+ SalesPrice {
+ public String toString() {
+ return "SalesPrice";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/ObservableProductAttributeSelector.java b/src/src/main/java/com/relewise/client/model/ObservableProductAttributeSelector.java
new file mode 100644
index 00000000..9b52368b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableProductAttributeSelector.java
@@ -0,0 +1,50 @@
+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 = ObservableProductAttributeSelector.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ObservableProductAttributeSelector extends ProductPropertySelector
+{
+ public String $type = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableProductAttributeSelector, Relewise.Client";
+ public ObservableProductAttribute attribute;
+ public static ObservableProductAttributeSelector create(ObservableProductAttribute attribute)
+ {
+ return new ObservableProductAttributeSelector(attribute);
+ }
+ public ObservableProductAttributeSelector(ObservableProductAttribute attribute)
+ {
+ this.attribute = attribute;
+ }
+ public ObservableProductAttributeSelector()
+ {
+ }
+ public ObservableProductAttribute getAttribute()
+ {
+ return this.attribute;
+ }
+ public ObservableProductAttributeSelector setAttribute(ObservableProductAttribute attribute)
+ {
+ this.attribute = attribute;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ObservableProductDataValueSelector.java b/src/src/main/java/com/relewise/client/model/ObservableProductDataValueSelector.java
new file mode 100644
index 00000000..8a54eba8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableProductDataValueSelector.java
@@ -0,0 +1,50 @@
+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 = ObservableProductDataValueSelector.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ObservableProductDataValueSelector extends ProductPropertySelector
+{
+ public String $type = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableProductDataValueSelector, Relewise.Client";
+ public DataObjectValueSelector dataObjectValueSelector;
+ public static ObservableProductDataValueSelector create(DataObjectValueSelector dataObjectValueSelector)
+ {
+ return new ObservableProductDataValueSelector(dataObjectValueSelector);
+ }
+ public ObservableProductDataValueSelector(DataObjectValueSelector dataObjectValueSelector)
+ {
+ this.dataObjectValueSelector = dataObjectValueSelector;
+ }
+ public ObservableProductDataValueSelector()
+ {
+ }
+ public DataObjectValueSelector getDataObjectValueSelector()
+ {
+ return this.dataObjectValueSelector;
+ }
+ public ObservableProductDataValueSelector setDataObjectValueSelector(DataObjectValueSelector dataObjectValueSelector)
+ {
+ this.dataObjectValueSelector = dataObjectValueSelector;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ObservableVariantAttribute.java b/src/src/main/java/com/relewise/client/model/ObservableVariantAttribute.java
new file mode 100644
index 00000000..d90bc108
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableVariantAttribute.java
@@ -0,0 +1,32 @@
+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 enum ObservableVariantAttribute
+{
+ ListPrice {
+ public String toString() {
+ return "ListPrice";
+ }
+ },
+ SalesPrice {
+ public String toString() {
+ return "SalesPrice";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/ObservableVariantAttributeSelector.java b/src/src/main/java/com/relewise/client/model/ObservableVariantAttributeSelector.java
new file mode 100644
index 00000000..59a6d89b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableVariantAttributeSelector.java
@@ -0,0 +1,50 @@
+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 = ObservableVariantAttributeSelector.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ObservableVariantAttributeSelector extends VariantPropertySelector
+{
+ public String $type = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableVariantAttributeSelector, Relewise.Client";
+ public ObservableVariantAttribute attribute;
+ public static ObservableVariantAttributeSelector create(ObservableVariantAttribute attribute)
+ {
+ return new ObservableVariantAttributeSelector(attribute);
+ }
+ public ObservableVariantAttributeSelector(ObservableVariantAttribute attribute)
+ {
+ this.attribute = attribute;
+ }
+ public ObservableVariantAttributeSelector()
+ {
+ }
+ public ObservableVariantAttribute getAttribute()
+ {
+ return this.attribute;
+ }
+ public ObservableVariantAttributeSelector setAttribute(ObservableVariantAttribute attribute)
+ {
+ this.attribute = attribute;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ObservableVariantDataValueSelector.java b/src/src/main/java/com/relewise/client/model/ObservableVariantDataValueSelector.java
new file mode 100644
index 00000000..ade62604
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ObservableVariantDataValueSelector.java
@@ -0,0 +1,50 @@
+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 = ObservableVariantDataValueSelector.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ObservableVariantDataValueSelector extends VariantPropertySelector
+{
+ public String $type = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableVariantDataValueSelector, Relewise.Client";
+ public DataObjectValueSelector dataObjectValueSelector;
+ public static ObservableVariantDataValueSelector create(DataObjectValueSelector dataObjectValueSelector)
+ {
+ return new ObservableVariantDataValueSelector(dataObjectValueSelector);
+ }
+ public ObservableVariantDataValueSelector(DataObjectValueSelector dataObjectValueSelector)
+ {
+ this.dataObjectValueSelector = dataObjectValueSelector;
+ }
+ public ObservableVariantDataValueSelector()
+ {
+ }
+ public DataObjectValueSelector getDataObjectValueSelector()
+ {
+ return this.dataObjectValueSelector;
+ }
+ public ObservableVariantDataValueSelector setDataObjectValueSelector(DataObjectValueSelector dataObjectValueSelector)
+ {
+ this.dataObjectValueSelector = dataObjectValueSelector;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/OrFilter.java b/src/src/main/java/com/relewise/client/model/OrFilter.java
index 17802f70..9e1fea1d 100644
--- a/src/src/main/java/com/relewise/client/model/OrFilter.java
+++ b/src/src/main/java/com/relewise/client/model/OrFilter.java
@@ -78,4 +78,10 @@ public OrFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public OrFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/Order.java b/src/src/main/java/com/relewise/client/model/Order.java
index f090babd..56fb6a3f 100644
--- a/src/src/main/java/com/relewise/client/model/Order.java
+++ b/src/src/main/java/com/relewise/client/model/Order.java
@@ -26,13 +26,16 @@
public class Order extends Trackable implements IUserIdentifier
{
public String $type = "Relewise.Client.DataTypes.Order, Relewise.Client";
- public User user;
+ public @Nullable User user;
public Money subtotal;
public ArrayList lineItems;
public String orderNumber;
public String cartName;
- public @Nullable String channel;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
+ /** @deprecated Use Channel.SubChannel instead. */
public @Nullable String subChannel;
+ public @Nullable HashMap data;
/** @deprecated Use OrderNumber instead. */
public @Nullable String trackingNumber;
public static Order create(User user, Money subtotal, String orderNumber, LineItem... lineItems)
@@ -63,7 +66,7 @@ public Order()
{
this.cartName = "default";
}
- public User getUser()
+ public @Nullable User getUser()
{
return this.user;
}
@@ -83,14 +86,20 @@ public String getCartName()
{
return this.cartName;
}
- public @Nullable String getChannel()
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
{
return this.channel;
}
+ /** @deprecated Use Channel.SubChannel instead. */
public @Nullable String getSubChannel()
{
return this.subChannel;
}
+ public @Nullable HashMap getData()
+ {
+ return this.data;
+ }
/** @deprecated Use OrderNumber instead. */
public @Nullable String getTrackingNumber()
{
@@ -130,16 +139,32 @@ public Order setCartName(String cartName)
this.cartName = cartName;
return this;
}
- public Order setChannel(String channel)
+ /** @deprecated Use User.Channel instead. */
+ public Order setChannel(Channel channel)
{
this.channel = channel;
return this;
}
+ /** @deprecated Use Channel.SubChannel instead. */
public Order setSubChannel(String subChannel)
{
this.subChannel = subChannel;
return this;
}
+ public Order addToData(String key, DataValue value)
+ {
+ if (this.data == null)
+ {
+ this.data = new HashMap<>();
+ }
+ this.data.put(key, value);
+ return this;
+ }
+ public Order setData(HashMap data)
+ {
+ this.data = data;
+ return this;
+ }
/** @deprecated Use OrderNumber instead. */
public Order setTrackingNumber(String trackingNumber)
{
diff --git a/src/src/main/java/com/relewise/client/model/OverriddenContentRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/OverriddenContentRecommendationRequestSettings.java
index e95278ba..fafbb54a 100644
--- a/src/src/main/java/com/relewise/client/model/OverriddenContentRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/OverriddenContentRecommendationRequestSettings.java
@@ -25,6 +25,7 @@ public class OverriddenContentRecommendationRequestSettings
public @Nullable Boolean allowReplacingOfRecentlyShownRecommendations;
public OverriddenSelectedContentPropertiesSettings selectedContentProperties;
public @Nullable Boolean prioritizeDiversityBetweenRequests;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static OverriddenContentRecommendationRequestSettings create()
{
return new OverriddenContentRecommendationRequestSettings();
@@ -52,6 +53,10 @@ public OverriddenSelectedContentPropertiesSettings getSelectedContentProperties(
{
return this.prioritizeDiversityBetweenRequests;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public OverriddenContentRecommendationRequestSettings setNumberOfRecommendations(@Nullable Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -77,4 +82,9 @@ public OverriddenContentRecommendationRequestSettings setPrioritizeDiversityBetw
this.prioritizeDiversityBetweenRequests = prioritizeDiversityBetweenRequests;
return this;
}
+ public OverriddenContentRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/OverriddenProductRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/OverriddenProductRecommendationRequestSettings.java
index f6e875a9..13a5ebb8 100644
--- a/src/src/main/java/com/relewise/client/model/OverriddenProductRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/OverriddenProductRecommendationRequestSettings.java
@@ -29,6 +29,7 @@ public class OverriddenProductRecommendationRequestSettings
public @Nullable Boolean prioritizeDiversityBetweenRequests;
public @Nullable Boolean allowProductsCurrentlyInCart;
public OverriddenSelectedBrandPropertiesSettings selectedBrandProperties;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static OverriddenProductRecommendationRequestSettings create()
{
return new OverriddenProductRecommendationRequestSettings();
@@ -72,6 +73,10 @@ public OverriddenSelectedBrandPropertiesSettings getSelectedBrandProperties()
{
return this.selectedBrandProperties;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public OverriddenProductRecommendationRequestSettings setNumberOfRecommendations(@Nullable Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -117,4 +122,9 @@ public OverriddenProductRecommendationRequestSettings setSelectedBrandProperties
this.selectedBrandProperties = selectedBrandProperties;
return this;
}
+ public OverriddenProductRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PaginatedSearchRequest.java b/src/src/main/java/com/relewise/client/model/PaginatedSearchRequest.java
index 02c81791..58d37d13 100644
--- a/src/src/main/java/com/relewise/client/model/PaginatedSearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PaginatedSearchRequest.java
@@ -95,4 +95,11 @@ public PaginatedSearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PaginatedSearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PersonalBrandRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PersonalBrandRecommendationRequest.java
index e61c90da..97bb8deb 100644
--- a/src/src/main/java/com/relewise/client/model/PersonalBrandRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PersonalBrandRecommendationRequest.java
@@ -104,4 +104,11 @@ public PersonalBrandRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PersonalBrandRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PersonalContentCategoryRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PersonalContentCategoryRecommendationRequest.java
index e60f4230..c0c46359 100644
--- a/src/src/main/java/com/relewise/client/model/PersonalContentCategoryRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PersonalContentCategoryRecommendationRequest.java
@@ -104,4 +104,11 @@ public PersonalContentCategoryRecommendationRequest setCurrency(Currency currenc
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PersonalContentCategoryRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PersonalContentRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PersonalContentRecommendationRequest.java
index 5966c63a..7193b08d 100644
--- a/src/src/main/java/com/relewise/client/model/PersonalContentRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PersonalContentRecommendationRequest.java
@@ -82,4 +82,11 @@ public PersonalContentRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PersonalContentRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PersonalProductCategoryRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PersonalProductCategoryRecommendationRequest.java
index 90d982a2..669df5bb 100644
--- a/src/src/main/java/com/relewise/client/model/PersonalProductCategoryRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PersonalProductCategoryRecommendationRequest.java
@@ -104,4 +104,11 @@ public PersonalProductCategoryRecommendationRequest setCurrency(Currency currenc
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PersonalProductCategoryRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PersonalProductRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PersonalProductRecommendationRequest.java
index bff70ec5..fbd4378c 100644
--- a/src/src/main/java/com/relewise/client/model/PersonalProductRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PersonalProductRecommendationRequest.java
@@ -82,4 +82,11 @@ public PersonalProductRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PersonalProductRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularBrandsRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PopularBrandsRecommendationRequest.java
index 0d9cba4c..95b7f3b1 100644
--- a/src/src/main/java/com/relewise/client/model/PopularBrandsRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularBrandsRecommendationRequest.java
@@ -104,4 +104,11 @@ public PopularBrandsRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularBrandsRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularContentCategoriesRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PopularContentCategoriesRecommendationRequest.java
index 72d7a475..e15744d3 100644
--- a/src/src/main/java/com/relewise/client/model/PopularContentCategoriesRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularContentCategoriesRecommendationRequest.java
@@ -104,4 +104,11 @@ public PopularContentCategoriesRecommendationRequest setCurrency(Currency curren
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularContentCategoriesRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularContentsRequest.java b/src/src/main/java/com/relewise/client/model/PopularContentsRequest.java
index 80d7b850..a8090455 100644
--- a/src/src/main/java/com/relewise/client/model/PopularContentsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularContentsRequest.java
@@ -93,4 +93,11 @@ public PopularContentsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularContentsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularProductCategoriesRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PopularProductCategoriesRecommendationRequest.java
index 97d8fe8c..0a1dbc71 100644
--- a/src/src/main/java/com/relewise/client/model/PopularProductCategoriesRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularProductCategoriesRecommendationRequest.java
@@ -104,4 +104,11 @@ public PopularProductCategoriesRecommendationRequest setCurrency(Currency curren
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularProductCategoriesRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularProductsRequest.java b/src/src/main/java/com/relewise/client/model/PopularProductsRequest.java
index 710f634d..3f8b9545 100644
--- a/src/src/main/java/com/relewise/client/model/PopularProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularProductsRequest.java
@@ -28,6 +28,8 @@ public class PopularProductsRequest extends ProductRecommendationRequest impleme
public String $type = "Relewise.Client.Requests.Recommendations.PopularProductsRequest, Relewise.Client";
public PopularityTypes basedOn;
public Integer sinceMinutesAgo;
+ /** A selector for changing the weighing of observed views or purchases on an entity basis when making the recommendation. */
+ public @Nullable PopularityMultiplierSelector popularityMultiplier;
public static PopularProductsRequest create(@Nullable Language language, @Nullable Currency currency, String displayedAtLocationType, User user, PopularityTypes basedOn, Integer sinceMinutesAgo)
{
return new PopularProductsRequest(language, currency, displayedAtLocationType, user, basedOn, sinceMinutesAgo);
@@ -52,6 +54,11 @@ public Integer getSinceMinutesAgo()
{
return this.sinceMinutesAgo;
}
+ /** A selector for changing the weighing of observed views or purchases on an entity basis when making the recommendation. */
+ public @Nullable PopularityMultiplierSelector getPopularityMultiplier()
+ {
+ return this.popularityMultiplier;
+ }
public PopularProductsRequest setBasedOn(PopularityTypes basedOn)
{
this.basedOn = basedOn;
@@ -62,6 +69,12 @@ public PopularProductsRequest setSinceMinutesAgo(Integer sinceMinutesAgo)
this.sinceMinutesAgo = sinceMinutesAgo;
return this;
}
+ /** A selector for changing the weighing of observed views or purchases on an entity basis when making the recommendation. */
+ public PopularProductsRequest setPopularityMultiplier(PopularityMultiplierSelector popularityMultiplier)
+ {
+ this.popularityMultiplier = popularityMultiplier;
+ return this;
+ }
@Override
public PopularProductsRequest setSettings(ProductRecommendationRequestSettings settings)
{
@@ -104,4 +117,11 @@ public PopularProductsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularSearchTermsRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/PopularSearchTermsRecommendationRequest.java
index ed710711..e2be8e1f 100644
--- a/src/src/main/java/com/relewise/client/model/PopularSearchTermsRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PopularSearchTermsRecommendationRequest.java
@@ -108,4 +108,11 @@ public PopularSearchTermsRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PopularSearchTermsRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PopularityMultiplierSelector.java b/src/src/main/java/com/relewise/client/model/PopularityMultiplierSelector.java
new file mode 100644
index 00000000..9d1db5d2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PopularityMultiplierSelector.java
@@ -0,0 +1,25 @@
+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 selector which can change the weighing of an observed view or purchase when making a PopularProductsRequest
. */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class PopularityMultiplierSelector
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/PopularityTypes.java b/src/src/main/java/com/relewise/client/model/PopularityTypes.java
index 8d64c665..50d168df 100644
--- a/src/src/main/java/com/relewise/client/model/PopularityTypes.java
+++ b/src/src/main/java/com/relewise/client/model/PopularityTypes.java
@@ -29,4 +29,9 @@ public String toString() {
return "MostViewed";
}
},
+ LineRevenue {
+ public String toString() {
+ return "LineRevenue";
+ }
+ },
}
diff --git a/src/src/main/java/com/relewise/client/model/PredictionRule.java b/src/src/main/java/com/relewise/client/model/PredictionRule.java
index 45635605..6f7821a2 100644
--- a/src/src/main/java/com/relewise/client/model/PredictionRule.java
+++ b/src/src/main/java/com/relewise/client/model/PredictionRule.java
@@ -25,7 +25,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class PredictionRule extends SearchRule
{
- public String $type = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.PredictionRule, Relewise.Client";
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.PredictionRule, Relewise.Client";
public SearchTermCondition condition;
public PredictionRulePromotion promote;
public PredictionRuleSuppression suppress;
diff --git a/src/src/main/java/com/relewise/client/model/PredictionRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/PredictionRuleSaveSearchRulesRequest.java
index 5564837b..85a8ab55 100644
--- a/src/src/main/java/com/relewise/client/model/PredictionRuleSaveSearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PredictionRuleSaveSearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class PredictionRuleSaveSearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/PredictionRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/PredictionRuleSearchRulesResponse.java
index de2b7e5d..f35f6a9a 100644
--- a/src/src/main/java/com/relewise/client/model/PredictionRuleSearchRulesResponse.java
+++ b/src/src/main/java/com/relewise/client/model/PredictionRuleSearchRulesResponse.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class PredictionRuleSearchRulesResponse extends TimedResponse
diff --git a/src/src/main/java/com/relewise/client/model/PredictionRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/PredictionRulesRequestSortBySearchRulesRequest.java
index 330779fb..4c3b7e1b 100644
--- a/src/src/main/java/com/relewise/client/model/PredictionRulesRequestSortBySearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PredictionRulesRequestSortBySearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class PredictionRulesRequestSortBySearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/ProductAndVariantIdAbandonedSearch.java b/src/src/main/java/com/relewise/client/model/ProductAndVariantIdAbandonedSearch.java
index 67a8aac0..03754644 100644
--- a/src/src/main/java/com/relewise/client/model/ProductAndVariantIdAbandonedSearch.java
+++ b/src/src/main/java/com/relewise/client/model/ProductAndVariantIdAbandonedSearch.java
@@ -49,4 +49,10 @@ public ProductAndVariantIdAbandonedSearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ @Override
+ public ProductAndVariantIdAbandonedSearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductAndVariantIdFilter.java b/src/src/main/java/com/relewise/client/model/ProductAndVariantIdFilter.java
index 18382cf5..b9e7cb79 100644
--- a/src/src/main/java/com/relewise/client/model/ProductAndVariantIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductAndVariantIdFilter.java
@@ -67,4 +67,10 @@ public ProductAndVariantIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductAndVariantIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/ProductAssortmentFilter.java
index 36dfbd7f..a4cfe071 100644
--- a/src/src/main/java/com/relewise/client/model/ProductAssortmentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductAssortmentFilter.java
@@ -67,4 +67,10 @@ public ProductAssortmentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductAssortmentRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductAssortmentRelevanceModifier.java
index 4cfccaac..840b6e2e 100644
--- a/src/src/main/java/com/relewise/client/model/ProductAssortmentRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductAssortmentRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on whether the Assortments match Assortments
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,7 +27,9 @@
public class ProductAssortmentRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductAssortmentRelevanceModifier, Relewise.Client";
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public Integer[] assortments;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
public static ProductAssortmentRelevanceModifier create()
{
@@ -44,19 +47,23 @@ public ProductAssortmentRelevanceModifier(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public Integer[] getAssortments()
{
return this.assortments;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public ProductAssortmentRelevanceModifier setAssortments(Integer... assortments)
{
this.assortments = assortments;
return this;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public ProductAssortmentRelevanceModifier addToAssortments(Integer assortment)
{
if (this.assortments == null)
@@ -71,6 +78,7 @@ public ProductAssortmentRelevanceModifier addToAssortments(Integer assortment)
}
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public ProductAssortmentRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryAssortmentFilter.java
index f829beff..2b761f0b 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryAssortmentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryAssortmentFilter.java
@@ -67,4 +67,10 @@ public ProductCategoryAssortmentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryDataFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryDataFilter.java
index 2ad050b7..74466121 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryDataFilter.java
@@ -150,4 +150,10 @@ public ProductCategoryDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryDataHasKeyFilter.java
new file mode 100644
index 00000000..feab2a21
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = ProductCategoryDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryDataHasKeyFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductCategoryDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static ProductCategoryDataHasKeyFilter create(String key)
+ {
+ return new ProductCategoryDataHasKeyFilter(key);
+ }
+ public ProductCategoryDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static ProductCategoryDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new ProductCategoryDataHasKeyFilter(key, negated);
+ }
+ public ProductCategoryDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public ProductCategoryDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public ProductCategoryDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ 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
new file mode 100644
index 00000000..a4082f54
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryDataRelevanceModifier.java
@@ -0,0 +1,121 @@
+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 RelevanceModifier
that can change the relevance of a ProductCategory depending on matching conditions on a certain key. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductCategoryDataRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryDataRelevanceModifier extends DataRelevanceModifier implements IProductCategoryRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryDataRelevanceModifier, Relewise.Client";
+ public static ProductCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ return new ProductCategoryDataRelevanceModifier(key, conditions, multiplierSelector);
+ }
+ public ProductCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = true;
+ this.considerAsMatchIfKeyIsNotFound = false;
+ }
+ /**
+ * 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).
+ */
+ public static ProductCategoryDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ return new ProductCategoryDataRelevanceModifier(key, conditions, multiplierSelector, mustMatchAllConditions, considerAsMatchIfKeyIsNotFound);
+ }
+ /**
+ * 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).
+ */
+ public ProductCategoryDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.key = key;
+ this.conditions = conditions;
+ this.multiplierSelector = multiplierSelector;
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ }
+ public ProductCategoryDataRelevanceModifier()
+ {
+ this.considerAsMatchIfKeyIsNotFound = false;
+ this.mustMatchAllConditions = true;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
+ {
+ this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
+ return this;
+ }
+ /** @deprecated Use MultiplierSelector instead */
+ @Override
+ public ProductCategoryDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
+ {
+ this.mustMatchAllConditions = mustMatchAllConditions;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setConditions(ValueCondition... conditions)
+ {
+ this.conditions = new ArrayList<>(Arrays.asList(conditions));;
+ return this;
+ }
+ public ProductCategoryDataRelevanceModifier addToConditions(ValueCondition conditions)
+ {
+ if (this.conditions == null)
+ {
+ this.conditions = new ArrayList<>();
+ }
+ this.conditions.add(conditions);
+ return this;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
+ {
+ this.multiplierSelector = multiplierSelector;
+ return this;
+ }
+ @Override
+ public ProductCategoryDataRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryDisabledFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryDisabledFilter.java
new file mode 100644
index 00000000..b0941ff8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductCategoryDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryDisabledFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductCategoryDisabledFilter, Relewise.Client";
+ public static ProductCategoryDisabledFilter create()
+ {
+ return new ProductCategoryDisabledFilter();
+ }
+ public ProductCategoryDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static ProductCategoryDisabledFilter create(Boolean negated)
+ {
+ return new ProductCategoryDisabledFilter(negated);
+ }
+ public ProductCategoryDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public ProductCategoryDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductCategoryDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryFacetQuery.java b/src/src/main/java/com/relewise/client/model/ProductCategoryFacetQuery.java
index 80558503..0e80a472 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryFacetQuery.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryFacetQuery.java
@@ -17,9 +17,15 @@
import java.util.Set;
import java.util.HashSet;
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductCategoryFacetQuery.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ProductCategoryFacetQuery
+public class ProductCategoryFacetQuery extends FacetQuery
{
+ public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.ProductCategoryFacetQuery, Relewise.Client";
public ArrayList items;
public static ProductCategoryFacetQuery create()
{
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryHasAncestorFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryHasAncestorFilter.java
index 3dc75f03..ab57f081 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryHasAncestorFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryHasAncestorFilter.java
@@ -63,4 +63,10 @@ public ProductCategoryHasAncestorFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryHasAncestorFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryHasChildFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryHasChildFilter.java
index 9cc4c270..9eeea191 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryHasChildFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryHasChildFilter.java
@@ -63,4 +63,10 @@ public ProductCategoryHasChildFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryHasChildFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryHasParentFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryHasParentFilter.java
index aa766b1a..77bf5f3f 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryHasParentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryHasParentFilter.java
@@ -63,4 +63,10 @@ public ProductCategoryHasParentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryHasParentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryHasProductsFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryHasProductsFilter.java
new file mode 100644
index 00000000..29354930
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryHasProductsFilter.java
@@ -0,0 +1,52 @@
+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 = ProductCategoryHasProductsFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryHasProductsFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductCategoryHasProductsFilter, Relewise.Client";
+ public static ProductCategoryHasProductsFilter create(Boolean negated)
+ {
+ return new ProductCategoryHasProductsFilter(negated);
+ }
+ public ProductCategoryHasProductsFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ProductCategoryHasProductsFilter()
+ {
+ }
+ @Override
+ public ProductCategoryHasProductsFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductCategoryHasProductsFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryIdFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryIdFilter.java
index 00a4192f..eb0e80e2 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryIdFilter.java
@@ -75,4 +75,10 @@ public ProductCategoryIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java
index 971798f5..3c6ef8d9 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on if the product is in a category that matches the given CategoryId
and EvaluationScope
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class ProductCategoryIdRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryIdRelevanceModifier, Relewise.Client";
+ /** The Id of the Category that this RelevanceModifier
will multiply the weight for. */
public String categoryId;
+ /** The relative Category levels that this RelevanceModifier
should match with. */
public CategoryScope evaluationScope;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match the specific CategoryId
instead. */
public Boolean negated;
public static ProductCategoryIdRelevanceModifier create(String categoryId, CategoryScope evaluationScope)
{
@@ -41,12 +46,24 @@ public ProductCategoryIdRelevanceModifier(String categoryId, CategoryScope evalu
this.multiplyWeightBy = 1d;
this.negated = false;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on if the product is in a category that matches the given CategoryId
and EvaluationScope
.
+ * @param categoryId The Id of the Category that this RelevanceModifier will multiply the weight for.
+ * @param evaluationScope The relative Category levels that this RelevanceModifier should match with.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that don't match the specific CategoryId instead.
+ */
public static ProductCategoryIdRelevanceModifier create(String categoryId, CategoryScope evaluationScope, Double multiplyWeightBy, Boolean negated)
{
return new ProductCategoryIdRelevanceModifier(categoryId, evaluationScope, multiplyWeightBy, negated);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on if the product is in a category that matches the given CategoryId
and EvaluationScope
.
+ * @param categoryId The Id of the Category that this RelevanceModifier will multiply the weight for.
+ * @param evaluationScope The relative Category levels that this RelevanceModifier should match with.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that don't match the specific CategoryId instead.
+ */
public ProductCategoryIdRelevanceModifier(String categoryId, CategoryScope evaluationScope, Double multiplyWeightBy, Boolean negated)
{
this.categoryId = categoryId;
@@ -59,37 +76,45 @@ public ProductCategoryIdRelevanceModifier()
this.multiplyWeightBy = 1d;
this.negated = false;
}
+ /** The Id of the Category that this RelevanceModifier
will multiply the weight for. */
public String getCategoryId()
{
return this.categoryId;
}
+ /** The relative Category levels that this RelevanceModifier
should match with. */
public CategoryScope getEvaluationScope()
{
return this.evaluationScope;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match the specific CategoryId
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The Id of the Category that this RelevanceModifier
will multiply the weight for. */
public ProductCategoryIdRelevanceModifier setCategoryId(String categoryId)
{
this.categoryId = categoryId;
return this;
}
+ /** The relative Category levels that this RelevanceModifier
should match with. */
public ProductCategoryIdRelevanceModifier setEvaluationScope(CategoryScope evaluationScope)
{
this.evaluationScope = evaluationScope;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public ProductCategoryIdRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match the specific CategoryId
instead. */
public ProductCategoryIdRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryLevelFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryLevelFilter.java
index 6844c2a8..068cabaa 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryLevelFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryLevelFilter.java
@@ -63,4 +63,10 @@ public ProductCategoryLevelFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductCategoryLevelFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserFilter.java b/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserFilter.java
new file mode 100644
index 00000000..45ee2734
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserFilter.java
@@ -0,0 +1,83 @@
+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 = ProductCategoryRecentlyViewedByUserFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryRecentlyViewedByUserFilter extends Filter implements ICategoryFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductCategoryRecentlyViewedByUserFilter, Relewise.Client";
+ public @Nullable OffsetDateTime sinceUtc;
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductCategoryRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductCategoryRecentlyViewedByUserFilter(sinceUtc);
+ }
+ public ProductCategoryRecentlyViewedByUserFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ public static ProductCategoryRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductCategoryRecentlyViewedByUserFilter(sinceUtc, negated);
+ }
+ public ProductCategoryRecentlyViewedByUserFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductCategoryRecentlyViewedByUserFilter()
+ {
+ this.negated = false;
+ }
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ public ProductCategoryRecentlyViewedByUserFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ public ProductCategoryRecentlyViewedByUserFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserRelevanceModifier.java
new file mode 100644
index 00000000..ebb4edf7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryRecentlyViewedByUserRelevanceModifier.java
@@ -0,0 +1,97 @@
+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 RelevanceModifier
that can change the relevance of a ProductCategory depending on whether they have viewed this content within some timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductCategoryRecentlyViewedByUserRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductCategoryRecentlyViewedByUserRelevanceModifier extends RecentlyViewedByUserRelevanceModifier implements IProductCategoryRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client";
+ public static ProductCategoryRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc)
+ {
+ return new ProductCategoryRecentlyViewedByUserRelevanceModifier(sinceUtc);
+ }
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a ProductCategory depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public static ProductCategoryRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ return new ProductCategoryRecentlyViewedByUserRelevanceModifier(sinceUtc, ifPreviouslyViewedByUserMultiplyWeightBy, ifNotPreviouslyViewedByUserMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a ProductCategory depending on whether they have viewed this content within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ }
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier()
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier setIfPreviouslyViewedByUserMultiplyWeightBy(Double ifPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier setIfNotPreviouslyViewedByUserMultiplyWeightBy(Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductCategoryRecentlyViewedByUserRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequest.java
index 3d3f68e4..1855ec8c 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequest.java
@@ -75,4 +75,11 @@ public ProductCategoryRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductCategoryRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestCollection.java b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestCollection.java
index 6a55193d..861b2e2b 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestCollection.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestCollection.java
@@ -27,14 +27,14 @@ public class ProductCategoryRecommendationRequestCollection extends LicensedRequ
{
public String $type = "Relewise.Client.Requests.Recommendations.ProductCategoryRecommendationRequestCollection, Relewise.Client";
public ArrayList requests;
- public Boolean requireDistinctContentAcrossResults;
- public static ProductCategoryRecommendationRequestCollection create(Boolean requireDistinctContentsAcrossResults, ProductCategoryRecommendationRequest... requests)
+ public Boolean requireDistinctCategoriesAcrossResults;
+ public static ProductCategoryRecommendationRequestCollection create(Boolean requireDistinctCategoriesesAcrossResults, ProductCategoryRecommendationRequest... requests)
{
- return new ProductCategoryRecommendationRequestCollection(requireDistinctContentsAcrossResults, requests);
+ return new ProductCategoryRecommendationRequestCollection(requireDistinctCategoriesesAcrossResults, requests);
}
- public ProductCategoryRecommendationRequestCollection(Boolean requireDistinctContentsAcrossResults, ProductCategoryRecommendationRequest... requests)
+ public ProductCategoryRecommendationRequestCollection(Boolean requireDistinctCategoriesesAcrossResults, ProductCategoryRecommendationRequest... requests)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentsAcrossResults;
+ this.requireDistinctCategoriesAcrossResults = requireDistinctCategoriesesAcrossResults;
this.requests = new ArrayList<>(Arrays.asList(requests));
}
public ProductCategoryRecommendationRequestCollection()
@@ -44,9 +44,9 @@ public ArrayList getRequests()
{
return this.requests;
}
- public Boolean getRequireDistinctContentAcrossResults()
+ public Boolean getRequireDistinctCategoriesAcrossResults()
{
- return this.requireDistinctContentAcrossResults;
+ return this.requireDistinctCategoriesAcrossResults;
}
public ProductCategoryRecommendationRequestCollection setRequests(ProductCategoryRecommendationRequest... requests)
{
@@ -62,9 +62,9 @@ public ProductCategoryRecommendationRequestCollection addToRequests(ProductCateg
this.requests.add(requests);
return this;
}
- public ProductCategoryRecommendationRequestCollection setRequireDistinctContentAcrossResults(Boolean requireDistinctContentAcrossResults)
+ public ProductCategoryRecommendationRequestCollection setRequireDistinctCategoriesAcrossResults(Boolean requireDistinctCategoriesAcrossResults)
{
- this.requireDistinctContentAcrossResults = requireDistinctContentAcrossResults;
+ this.requireDistinctCategoriesAcrossResults = requireDistinctCategoriesAcrossResults;
return this;
}
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestSettings.java
index 4f6c62dc..cfed309a 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryRecommendationRequestSettings.java
@@ -25,6 +25,7 @@ public class ProductCategoryRecommendationRequestSettings
public Boolean allowReplacingOfRecentlyShownRecommendations;
public Boolean prioritizeDiversityBetweenRequests;
public SelectedProductCategoryPropertiesSettings selectedProductCategoryProperties;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static ProductCategoryRecommendationRequestSettings create()
{
return new ProductCategoryRecommendationRequestSettings();
@@ -52,6 +53,10 @@ public SelectedProductCategoryPropertiesSettings getSelectedProductCategoryPrope
{
return this.selectedProductCategoryProperties;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public ProductCategoryRecommendationRequestSettings setNumberOfRecommendations(Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -77,4 +82,9 @@ public ProductCategoryRecommendationRequestSettings setSelectedProductCategoryPr
this.selectedProductCategoryProperties = selectedProductCategoryProperties;
return this;
}
+ public ProductCategoryRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategorySearchRequest.java b/src/src/main/java/com/relewise/client/model/ProductCategorySearchRequest.java
index 345d18fd..a301836e 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategorySearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategorySearchRequest.java
@@ -158,4 +158,11 @@ public ProductCategorySearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductCategorySearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryView.java b/src/src/main/java/com/relewise/client/model/ProductCategoryView.java
index 94972c1a..d978cd81 100644
--- a/src/src/main/java/com/relewise/client/model/ProductCategoryView.java
+++ b/src/src/main/java/com/relewise/client/model/ProductCategoryView.java
@@ -28,6 +28,8 @@ public class ProductCategoryView extends Trackable implements IUserIdentifier
public String $type = "Relewise.Client.DataTypes.ProductCategoryView, Relewise.Client";
public @Nullable User user;
public String[] idPath;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static ProductCategoryView create(@Nullable User user, String... idPath)
{
return new ProductCategoryView(user, idPath);
@@ -48,6 +50,11 @@ public String[] getIdPath()
{
return this.idPath;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public ProductCategoryView setUser(User user)
{
this.user = user;
@@ -72,4 +79,10 @@ public ProductCategoryView addToIdPath(String idPath)
}
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public ProductCategoryView setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerConfiguration.java
new file mode 100644
index 00000000..416008aa
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerConfiguration.java
@@ -0,0 +1,155 @@
+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 = ProductChangeTriggerConfiguration.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductChangeTriggerConfiguration extends ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration
+{
+ public String $type = "Relewise.Client.DataTypes.Triggers.Configurations.ProductChangeTriggerConfiguration, Relewise.Client";
+ public static ProductChangeTriggerConfiguration create(String name, String description, ProductPropertySelector entityPropertySelector, IChange change, ProductChangeTriggerResultSettings resultSettings)
+ {
+ return new ProductChangeTriggerConfiguration(name, description, entityPropertySelector, change, resultSettings);
+ }
+ public ProductChangeTriggerConfiguration(String name, String description, ProductPropertySelector entityPropertySelector, IChange change, ProductChangeTriggerResultSettings resultSettings)
+ {
+ this.name = name;
+ this.description = description;
+ this.entityPropertySelector = entityPropertySelector;
+ this.change = change;
+ this.resultSettings = resultSettings;
+ }
+ public ProductChangeTriggerConfiguration()
+ {
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setEntityPropertySelector(ProductPropertySelector entityPropertySelector)
+ {
+ this.entityPropertySelector = entityPropertySelector;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setBeforeChangeFilters(FilterCollection beforeChangeFilters)
+ {
+ this.beforeChangeFilters = beforeChangeFilters;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setAfterChangeFilters(FilterCollection afterChangeFilters)
+ {
+ this.afterChangeFilters = afterChangeFilters;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setChange(IChange change)
+ {
+ this.change = change;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setResultSettings(ProductChangeTriggerResultSettings resultSettings)
+ {
+ this.resultSettings = resultSettings;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public ProductChangeTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResult.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResult.java
new file mode 100644
index 00000000..c88f284b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResult.java
@@ -0,0 +1,67 @@
+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 = ProductChangeTriggerResult.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductChangeTriggerResult extends ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult implements ITriggerResult
+{
+ public String $type = "Relewise.Client.Responses.Triggers.Results.ProductChangeTriggerResult, Relewise.Client";
+ public static ProductChangeTriggerResult create(UserResultDetails user, ProductChangeTriggerResultProductChangeResultDetails... entitiesWithChanges)
+ {
+ return new ProductChangeTriggerResult(user, entitiesWithChanges);
+ }
+ public ProductChangeTriggerResult(UserResultDetails user, ProductChangeTriggerResultProductChangeResultDetails... entitiesWithChanges)
+ {
+ this.user = user;
+ this.entitiesWithChanges = entitiesWithChanges;
+ }
+ public ProductChangeTriggerResult()
+ {
+ }
+ @Override
+ public ProductChangeTriggerResult setEntitiesWithChanges(ProductChangeTriggerResultProductChangeResultDetails... entitiesWithChanges)
+ {
+ this.entitiesWithChanges = entitiesWithChanges;
+ return this;
+ }
+ public ProductChangeTriggerResult addToEntitiesWithChanges(ProductChangeTriggerResultProductChangeResultDetails entitiesWithChange)
+ {
+ if (this.entitiesWithChanges == null)
+ {
+ this.entitiesWithChanges = new ProductChangeTriggerResultProductChangeResultDetails[] { entitiesWithChange };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entitiesWithChanges));
+ existingList.add(entitiesWithChange);
+ this.entitiesWithChanges = existingList.toArray(new ProductChangeTriggerResultProductChangeResultDetails[0]);
+ }
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResult setUser(UserResultDetails user)
+ {
+ this.user = user;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetails.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetails.java
new file mode 100644
index 00000000..7027e56e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetails.java
@@ -0,0 +1,77 @@
+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 ProductChangeTriggerResultProductChangeResultDetails
+{
+ public OffsetDateTime changeTimeUtc;
+ public DataValue oldValue;
+ public DataValue newValue;
+ public ProductResultDetails product;
+ public static ProductChangeTriggerResultProductChangeResultDetails create(OffsetDateTime changeTimeUtc, DataValue oldValue, DataValue newValue, ProductResultDetails product)
+ {
+ return new ProductChangeTriggerResultProductChangeResultDetails(changeTimeUtc, oldValue, newValue, product);
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails(OffsetDateTime changeTimeUtc, DataValue oldValue, DataValue newValue, ProductResultDetails product)
+ {
+ this.changeTimeUtc = changeTimeUtc;
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ this.product = product;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails()
+ {
+ }
+ public OffsetDateTime getChangeTimeUtc()
+ {
+ return this.changeTimeUtc;
+ }
+ public DataValue getOldValue()
+ {
+ return this.oldValue;
+ }
+ public DataValue getNewValue()
+ {
+ return this.newValue;
+ }
+ public ProductResultDetails getProduct()
+ {
+ return this.product;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails setChangeTimeUtc(OffsetDateTime changeTimeUtc)
+ {
+ this.changeTimeUtc = changeTimeUtc;
+ return this;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails setOldValue(DataValue oldValue)
+ {
+ this.oldValue = oldValue;
+ return this;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails setNewValue(DataValue newValue)
+ {
+ this.newValue = newValue;
+ return this;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetails setProduct(ProductResultDetails product)
+ {
+ this.product = product;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult.java
new file mode 100644
index 00000000..c0fa4ec3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult.java
@@ -0,0 +1,46 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult extends EntityChangeTriggerResult implements ITriggerResult
+{
+ public String $type = "";
+ public ProductChangeTriggerResultProductChangeResultDetails[] entitiesWithChanges;
+ public ProductChangeTriggerResultProductChangeResultDetails[] getEntitiesWithChanges()
+ {
+ return this.entitiesWithChanges;
+ }
+ public ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult setEntitiesWithChanges(ProductChangeTriggerResultProductChangeResultDetails... entitiesWithChanges)
+ {
+ this.entitiesWithChanges = entitiesWithChanges;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeResultDetailsEntityChangeTriggerResult setUser(UserResultDetails user)
+ {
+ this.user = user;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration.java
new file mode 100644
index 00000000..0595a3a1
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration.java
@@ -0,0 +1,176 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration extends ProductChangeTriggerResultTriggerConfiguration
+{
+ public String $type = "";
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable ProductPropertySelector entityPropertySelector;
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection beforeChangeFilters;
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection afterChangeFilters;
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange change;
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable ProductChangeTriggerResultSettings resultSettings;
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable ProductPropertySelector getEntityPropertySelector()
+ {
+ return this.entityPropertySelector;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection getBeforeChangeFilters()
+ {
+ return this.beforeChangeFilters;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection getAfterChangeFilters()
+ {
+ return this.afterChangeFilters;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange getChange()
+ {
+ return this.change;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable ProductChangeTriggerResultSettings getResultSettings()
+ {
+ return this.resultSettings;
+ }
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setEntityPropertySelector(ProductPropertySelector entityPropertySelector)
+ {
+ this.entityPropertySelector = entityPropertySelector;
+ return this;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setBeforeChangeFilters(FilterCollection beforeChangeFilters)
+ {
+ this.beforeChangeFilters = beforeChangeFilters;
+ return this;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setAfterChangeFilters(FilterCollection afterChangeFilters)
+ {
+ this.afterChangeFilters = afterChangeFilters;
+ return this;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setChange(IChange change)
+ {
+ this.change = change;
+ return this;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setResultSettings(ProductChangeTriggerResultSettings resultSettings)
+ {
+ this.resultSettings = resultSettings;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java
new file mode 100644
index 00000000..b1f06257
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultSettings.java
@@ -0,0 +1,50 @@
+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 ProductChangeTriggerResultSettings
+{
+ public SelectedProductPropertiesSettings selectedProductProperties;
+ public SelectedVariantPropertiesSettings selectedVariantProperties;
+ public static ProductChangeTriggerResultSettings create()
+ {
+ return new ProductChangeTriggerResultSettings();
+ }
+ public ProductChangeTriggerResultSettings()
+ {
+ }
+ public SelectedProductPropertiesSettings getSelectedProductProperties()
+ {
+ return this.selectedProductProperties;
+ }
+ public SelectedVariantPropertiesSettings getSelectedVariantProperties()
+ {
+ return this.selectedVariantProperties;
+ }
+ public ProductChangeTriggerResultSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties)
+ {
+ this.selectedProductProperties = selectedProductProperties;
+ return this;
+ }
+ public ProductChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantPropertiesSettings selectedVariantProperties)
+ {
+ this.selectedVariantProperties = selectedVariantProperties;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultTriggerConfiguration.java
new file mode 100644
index 00000000..0b376852
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductChangeTriggerResultTriggerConfiguration.java
@@ -0,0 +1,111 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class ProductChangeTriggerResultTriggerConfiguration extends TriggerConfiguration
+{
+ public String $type = "";
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public ProductChangeTriggerResultTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public ProductChangeTriggerResultTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductDataFilter.java b/src/src/main/java/com/relewise/client/model/ProductDataFilter.java
index 6c566b59..6782137d 100644
--- a/src/src/main/java/com/relewise/client/model/ProductDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductDataFilter.java
@@ -150,4 +150,10 @@ public ProductDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/ProductDataHasKeyFilter.java
new file mode 100644
index 00000000..63c927c8
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = ProductDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductDataHasKeyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static ProductDataHasKeyFilter create(String key)
+ {
+ return new ProductDataHasKeyFilter(key);
+ }
+ public ProductDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static ProductDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new ProductDataHasKeyFilter(key, negated);
+ }
+ public ProductDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public ProductDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public ProductDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public ProductDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
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 90e26322..73c21d34 100644
--- a/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java
@@ -17,22 +17,16 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on matching conditions on a certain key. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "$type",
defaultImpl = ProductDataRelevanceModifier.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ProductDataRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+public class ProductDataRelevanceModifier extends DataRelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductDataRelevanceModifier, Relewise.Client";
- public String key;
- public Boolean considerAsMatchIfKeyIsNotFound;
- /** @deprecated Use MultiplierSelector instead */
- public Double multiplyWeightBy;
- public Boolean mustMatchAllConditions;
- public ArrayList conditions;
- public ValueSelector multiplierSelector;
public static ProductDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector)
{
return new ProductDataRelevanceModifier(key, conditions, multiplierSelector);
@@ -45,10 +39,20 @@ public ProductDataRelevanceModifier(String key, ArrayList condit
this.mustMatchAllConditions = true;
this.considerAsMatchIfKeyIsNotFound = false;
}
+ /**
+ * 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).
+ */
public static ProductDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
{
return new ProductDataRelevanceModifier(key, conditions, multiplierSelector, mustMatchAllConditions, considerAsMatchIfKeyIsNotFound);
}
+ /**
+ * 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).
+ */
public ProductDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
{
this.key = key;
@@ -62,52 +66,32 @@ public ProductDataRelevanceModifier()
this.considerAsMatchIfKeyIsNotFound = false;
this.mustMatchAllConditions = true;
}
- public String getKey()
- {
- return this.key;
- }
- public Boolean getConsiderAsMatchIfKeyIsNotFound()
- {
- return this.considerAsMatchIfKeyIsNotFound;
- }
- /** @deprecated Use MultiplierSelector instead */
- public Double getMultiplyWeightBy()
- {
- return this.multiplyWeightBy;
- }
- public Boolean getMustMatchAllConditions()
- {
- return this.mustMatchAllConditions;
- }
- public ArrayList getConditions()
- {
- return this.conditions;
- }
- public ValueSelector getMultiplierSelector()
- {
- return this.multiplierSelector;
- }
+ @Override
public ProductDataRelevanceModifier setKey(String key)
{
this.key = key;
return this;
}
+ @Override
public ProductDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
{
this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
return this;
}
/** @deprecated Use MultiplierSelector instead */
+ @Override
public ProductDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ @Override
public ProductDataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
{
this.mustMatchAllConditions = mustMatchAllConditions;
return this;
}
+ @Override
public ProductDataRelevanceModifier setConditions(ValueCondition... conditions)
{
this.conditions = new ArrayList<>(Arrays.asList(conditions));;
@@ -122,6 +106,7 @@ public ProductDataRelevanceModifier addToConditions(ValueCondition conditions)
this.conditions.add(conditions);
return this;
}
+ @Override
public ProductDataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
{
this.multiplierSelector = multiplierSelector;
diff --git a/src/src/main/java/com/relewise/client/model/ProductDetailsCollectionResponse.java b/src/src/main/java/com/relewise/client/model/ProductDetailsCollectionResponse.java
index d189ad95..fe3c6e12 100644
--- a/src/src/main/java/com/relewise/client/model/ProductDetailsCollectionResponse.java
+++ b/src/src/main/java/com/relewise/client/model/ProductDetailsCollectionResponse.java
@@ -28,6 +28,8 @@ public class ProductDetailsCollectionResponse extends TimedResponse
public String $type = "Relewise.Client.Responses.ProductDetailsCollectionResponse, Relewise.Client";
public ProductResultDetails[] products;
public @Nullable Integer totalNumberOfResults;
+ /** Provides a token for NextPageToken
to consume ProductQuery
results in pages of PageSize
. Turns null
as soon as cursor is fully exhausted/read/processed. Once null is returned, there are no more data to be retrieved and no more requests should be made. */
+ public @Nullable UUID nextPageToken;
public static ProductDetailsCollectionResponse create(ProductResultDetails[] products, @Nullable Integer totalNumberOfResults)
{
return new ProductDetailsCollectionResponse(products, totalNumberOfResults);
@@ -48,6 +50,11 @@ public ProductResultDetails[] getProducts()
{
return this.totalNumberOfResults;
}
+ /** Provides a token for NextPageToken
to consume ProductQuery
results in pages of PageSize
. Turns null
as soon as cursor is fully exhausted/read/processed. Once null is returned, there are no more data to be retrieved and no more requests should be made. */
+ public @Nullable UUID getNextPageToken()
+ {
+ return this.nextPageToken;
+ }
public ProductDetailsCollectionResponse setProducts(ProductResultDetails... products)
{
this.products = products;
@@ -72,6 +79,12 @@ public ProductDetailsCollectionResponse setTotalNumberOfResults(@Nullable Intege
this.totalNumberOfResults = totalNumberOfResults;
return this;
}
+ /** Provides a token for NextPageToken
to consume ProductQuery
results in pages of PageSize
. Turns null
as soon as cursor is fully exhausted/read/processed. Once null is returned, there are no more data to be retrieved and no more requests should be made. */
+ public ProductDetailsCollectionResponse setNextPageToken(@Nullable UUID nextPageToken)
+ {
+ this.nextPageToken = nextPageToken;
+ return this;
+ }
@Override
public ProductDetailsCollectionResponse setStatistics(Statistics statistics)
{
diff --git a/src/src/main/java/com/relewise/client/model/ProductDisabledFilter.java b/src/src/main/java/com/relewise/client/model/ProductDisabledFilter.java
new file mode 100644
index 00000000..4c9a226e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductDisabledFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductDisabledFilter, Relewise.Client";
+ public static ProductDisabledFilter create()
+ {
+ return new ProductDisabledFilter();
+ }
+ public ProductDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static ProductDisabledFilter create(Boolean negated)
+ {
+ return new ProductDisabledFilter(negated);
+ }
+ public ProductDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public ProductDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductDisplayNameFilter.java b/src/src/main/java/com/relewise/client/model/ProductDisplayNameFilter.java
index 9a4d7058..a976685a 100644
--- a/src/src/main/java/com/relewise/client/model/ProductDisplayNameFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductDisplayNameFilter.java
@@ -87,4 +87,10 @@ public ProductDisplayNameFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductDisplayNameFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductFacetQuery.java b/src/src/main/java/com/relewise/client/model/ProductFacetQuery.java
index cf3e84c3..b9c97f21 100644
--- a/src/src/main/java/com/relewise/client/model/ProductFacetQuery.java
+++ b/src/src/main/java/com/relewise/client/model/ProductFacetQuery.java
@@ -17,9 +17,15 @@
import java.util.Set;
import java.util.HashSet;
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductFacetQuery.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ProductFacetQuery
+public class ProductFacetQuery extends FacetQuery
{
+ public String $type = "Relewise.Client.DataTypes.Search.Facets.Queries.ProductFacetQuery, Relewise.Client";
public ArrayList items;
public static ProductFacetQuery create()
{
diff --git a/src/src/main/java/com/relewise/client/model/ProductHasCategoriesFilter.java b/src/src/main/java/com/relewise/client/model/ProductHasCategoriesFilter.java
new file mode 100644
index 00000000..3bc955ec
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductHasCategoriesFilter.java
@@ -0,0 +1,52 @@
+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 = ProductHasCategoriesFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductHasCategoriesFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductHasCategoriesFilter, Relewise.Client";
+ public static ProductHasCategoriesFilter create(Boolean negated)
+ {
+ return new ProductHasCategoriesFilter(negated);
+ }
+ public ProductHasCategoriesFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ public ProductHasCategoriesFilter()
+ {
+ }
+ @Override
+ public ProductHasCategoriesFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductHasCategoriesFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductHasVariantsFilter.java b/src/src/main/java/com/relewise/client/model/ProductHasVariantsFilter.java
index aa8533a4..2579a820 100644
--- a/src/src/main/java/com/relewise/client/model/ProductHasVariantsFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductHasVariantsFilter.java
@@ -64,4 +64,10 @@ public ProductHasVariantsFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductHasVariantsFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductIdFilter.java b/src/src/main/java/com/relewise/client/model/ProductIdFilter.java
index c9157660..ac7b7cbc 100644
--- a/src/src/main/java/com/relewise/client/model/ProductIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductIdFilter.java
@@ -67,4 +67,10 @@ public ProductIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductIdRelevanceModifier.java
index 1efe6852..abf701a8 100644
--- a/src/src/main/java/com/relewise/client/model/ProductIdRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductIdRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on whether it is contained in a set of ProductIds
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,8 +27,11 @@
public class ProductIdRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductIdRelevanceModifier, Relewise.Client";
+ /** The Ids of the Products that this RelevanceModifier
will distinguish on. */
public String[] productIds;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match one of the specified ProductIds
instead. */
public Boolean negated;
public static ProductIdRelevanceModifier create()
{
@@ -47,23 +51,28 @@ public ProductIdRelevanceModifier(Double multiplyWeightBy, Boolean negated)
this.multiplyWeightBy = multiplyWeightBy;
this.negated = negated;
}
+ /** The Ids of the Products that this RelevanceModifier
will distinguish on. */
public String[] getProductIds()
{
return this.productIds;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match one of the specified ProductIds
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The Ids of the Products that this RelevanceModifier
will distinguish on. */
public ProductIdRelevanceModifier setProductIds(String... productIds)
{
this.productIds = productIds;
return this;
}
+ /** The Ids of the Products that this RelevanceModifier
will distinguish on. */
public ProductIdRelevanceModifier addToProductIds(String productId)
{
if (this.productIds == null)
@@ -78,11 +87,13 @@ public ProductIdRelevanceModifier addToProductIds(String productId)
}
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public ProductIdRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that don't match one of the specified ProductIds
instead. */
public ProductIdRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/ProductListPriceFilter.java b/src/src/main/java/com/relewise/client/model/ProductListPriceFilter.java
index c3e1aacc..f3368f78 100644
--- a/src/src/main/java/com/relewise/client/model/ProductListPriceFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductListPriceFilter.java
@@ -77,4 +77,10 @@ public ProductListPriceFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductListPriceFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java
index 6df8cbe9..438afcc9 100644
--- a/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on the list price falling within a specific Range
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class ProductListPriceRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductListPriceRelevanceModifier, Relewise.Client";
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public DoubleRange range;
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency currency;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean negated;
public static ProductListPriceRelevanceModifier create(DoubleRange range)
{
@@ -41,12 +46,24 @@ public ProductListPriceRelevanceModifier(DoubleRange range)
this.currency = null;
this.negated = false;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on the list price falling within a specific Range
.
+ * @param range The range of list prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public static ProductListPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
return new ProductListPriceRelevanceModifier(range, multiplyWeightBy, currency, negated);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on the list price falling within a specific Range
.
+ * @param range The range of list prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public ProductListPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
this.range = range;
@@ -60,37 +77,45 @@ public ProductListPriceRelevanceModifier()
this.multiplyWeightBy = 1d;
this.negated = false;
}
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public DoubleRange getRange()
{
return this.range;
}
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency getCurrency()
{
return this.currency;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public ProductListPriceRelevanceModifier setRange(DoubleRange range)
{
this.range = range;
return this;
}
+ /** The currency that is used to distinguish the price. */
public ProductListPriceRelevanceModifier setCurrency(Currency currency)
{
this.currency = currency;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public ProductListPriceRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public ProductListPriceRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/ProductPromotion.java b/src/src/main/java/com/relewise/client/model/ProductPromotion.java
new file mode 100644
index 00000000..3368e4be
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductPromotion.java
@@ -0,0 +1,67 @@
+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 = ProductPromotion.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductPromotion extends Promotion
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion, Relewise.Client";
+ /** Filters matching the products to be promoted */
+ public @Nullable FilterCollection filters;
+ public static ProductPromotion create(String name, @Nullable FilterCollection filters, PromotionLocationCollection locations)
+ {
+ return new ProductPromotion(name, filters, locations);
+ }
+ public ProductPromotion(String name, @Nullable FilterCollection filters, PromotionLocationCollection locations)
+ {
+ this.name = name;
+ this.filters = filters;
+ this.locations = locations;
+ }
+ public ProductPromotion()
+ {
+ }
+ /** Filters matching the products to be promoted */
+ public @Nullable FilterCollection getFilters()
+ {
+ return this.filters;
+ }
+ /** Filters matching the products to be promoted */
+ public ProductPromotion setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public ProductPromotion setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public ProductPromotion setLocations(PromotionLocationCollection locations)
+ {
+ this.locations = locations;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductPromotionSpecification.java b/src/src/main/java/com/relewise/client/model/ProductPromotionSpecification.java
new file mode 100644
index 00000000..e15edb29
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductPromotionSpecification.java
@@ -0,0 +1,54 @@
+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;
+
+/** Used for specifying that this kind of promotion is allowed at a specific Location as well as for specific advertisers */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductPromotionSpecification.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductPromotionSpecification extends PromotionSpecification
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion+Specification, Relewise.Client";
+ /** Filters matching the products which may be promoted */
+ public @Nullable FilterCollection promotableProducts;
+ public static ProductPromotionSpecification create(FilterCollection promotableProducts)
+ {
+ return new ProductPromotionSpecification(promotableProducts);
+ }
+ public ProductPromotionSpecification(FilterCollection promotableProducts)
+ {
+ this.promotableProducts = promotableProducts;
+ }
+ public ProductPromotionSpecification()
+ {
+ }
+ /** Filters matching the products which may be promoted */
+ public @Nullable FilterCollection getPromotableProducts()
+ {
+ return this.promotableProducts;
+ }
+ /** Filters matching the products which may be promoted */
+ public ProductPromotionSpecification setPromotableProducts(FilterCollection promotableProducts)
+ {
+ this.promotableProducts = promotableProducts;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductPromotionSpecificationVariation.java b/src/src/main/java/com/relewise/client/model/ProductPromotionSpecificationVariation.java
new file mode 100644
index 00000000..8aae1f3e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductPromotionSpecificationVariation.java
@@ -0,0 +1,54 @@
+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;
+
+/** Used for specifying that this kind of promotion is allowed at a specific Location as well as for specific advertisers */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductPromotionSpecificationVariation.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductPromotionSpecificationVariation extends PromotionSpecificationVariation
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion+SpecificationVariation, Relewise.Client";
+ /** The maximum number of products to promote at a time in this variation. */
+ public Integer maxCount;
+ public static ProductPromotionSpecificationVariation create(Integer maxCount)
+ {
+ return new ProductPromotionSpecificationVariation(maxCount);
+ }
+ public ProductPromotionSpecificationVariation(Integer maxCount)
+ {
+ this.maxCount = maxCount;
+ }
+ public ProductPromotionSpecificationVariation()
+ {
+ }
+ /** The maximum number of products to promote at a time in this variation. */
+ public Integer getMaxCount()
+ {
+ return this.maxCount;
+ }
+ /** The maximum number of products to promote at a time in this variation. */
+ public ProductPromotionSpecificationVariation setMaxCount(Integer maxCount)
+ {
+ this.maxCount = maxCount;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductPropertySelector.java b/src/src/main/java/com/relewise/client/model/ProductPropertySelector.java
new file mode 100644
index 00000000..f041bf0b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductPropertySelector.java
@@ -0,0 +1,24 @@
+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 abstract class ProductPropertySelector
+{
+ public String $type = "";
+}
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 4fe0b849..7565418d 100644
--- a/src/src/main/java/com/relewise/client/model/ProductQuery.java
+++ b/src/src/main/java/com/relewise/client/model/ProductQuery.java
@@ -26,37 +26,78 @@
public class ProductQuery extends LicensedRequest
{
public String $type = "Relewise.Client.Requests.Queries.ProductQuery, Relewise.Client";
- public FilterCollection filters;
+ public @Nullable FilterCollection filters;
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public Integer numberOfResults;
public @Nullable Language language;
public @Nullable Currency currency;
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public Integer skipNumberOfResults;
public Boolean returnTotalNumberOfResults;
public Boolean includeDisabledProducts;
public Boolean includeDisabledVariants;
public Boolean excludeProductsWithNoVariants;
- public static ProductQuery create()
+ /** The identifier for the ProductQuery
paged cursor, to consume results in PageSize
batches. Leave as null
for retrieving the first page, and set to the value returned in NextPageToken
for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
+ public @Nullable UUID nextPageToken;
+ /** The size of the page requested. Maximum allowed value is 1000. */
+ public @Nullable Integer pageSize;
+ public static ProductQuery create(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants)
{
- return new ProductQuery();
+ return new ProductQuery(filters, excludeProductsWithNoVariants);
}
- public ProductQuery()
+ public ProductQuery(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants)
{
+ this.filters = filters;
+ this.excludeProductsWithNoVariants = excludeProductsWithNoVariants;
+ this.pageSize = 10;
this.language = null;
this.currency = null;
- }
- public static ProductQuery create(@Nullable Language language, Currency currency)
- {
- return new ProductQuery(language, currency);
- }
- public ProductQuery(@Nullable Language language, Currency currency)
+ this.nextPageToken = null;
+ }
+ /**
+ * Initiates a new instance of ProductQuery
with support for paging. The initial request needs to set PageSize
. Should results span over multiple pages, the response would have token for .
+ * @param filters The filters to be executed to limit results.
+ * @param excludeProductsWithNoVariants Should products without variants be included.
+ * @param pageSize The positive number of elements in page should results span over multiple pages.
+ * @param language The language to use.
+ * @param currency The currency to use.
+ * @param nextPageToken The token returned as a part of previous
+ */
+ public static ProductQuery create(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants, Integer pageSize, @Nullable Language language, @Nullable Currency currency, @Nullable UUID nextPageToken)
+ {
+ return new ProductQuery(filters, excludeProductsWithNoVariants, pageSize, language, currency, nextPageToken);
+ }
+ /**
+ * Initiates a new instance of ProductQuery
with support for paging. The initial request needs to set PageSize
. Should results span over multiple pages, the response would have token for .
+ * @param filters The filters to be executed to limit results.
+ * @param excludeProductsWithNoVariants Should products without variants be included.
+ * @param pageSize The positive number of elements in page should results span over multiple pages.
+ * @param language The language to use.
+ * @param currency The currency to use.
+ * @param nextPageToken The token returned as a part of previous
+ */
+ public ProductQuery(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants, Integer pageSize, @Nullable Language language, @Nullable Currency currency, @Nullable UUID nextPageToken)
{
+ this.filters = filters;
+ this.excludeProductsWithNoVariants = excludeProductsWithNoVariants;
+ this.pageSize = pageSize;
this.language = language;
this.currency = currency;
+ this.nextPageToken = nextPageToken;
}
- public FilterCollection getFilters()
+ public ProductQuery()
+ {
+ this.language = null;
+ this.currency = null;
+ this.skipNumberOfResults = 0;
+ this.returnTotalNumberOfResults = false;
+ this.nextPageToken = null;
+ }
+ public @Nullable FilterCollection getFilters()
{
return this.filters;
}
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public Integer getNumberOfResults()
{
return this.numberOfResults;
@@ -69,6 +110,7 @@ public Integer getNumberOfResults()
{
return this.currency;
}
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public Integer getSkipNumberOfResults()
{
return this.skipNumberOfResults;
@@ -89,11 +131,22 @@ public Boolean getExcludeProductsWithNoVariants()
{
return this.excludeProductsWithNoVariants;
}
+ /** The identifier for the ProductQuery
paged cursor, to consume results in PageSize
batches. Leave as null
for retrieving the first page, and set to the value returned in NextPageToken
for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
+ public @Nullable UUID getNextPageToken()
+ {
+ return this.nextPageToken;
+ }
+ /** The size of the page requested. Maximum allowed value is 1000. */
+ public @Nullable Integer getPageSize()
+ {
+ return this.pageSize;
+ }
public ProductQuery setFilters(FilterCollection filters)
{
this.filters = filters;
return this;
}
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public ProductQuery setNumberOfResults(Integer numberOfResults)
{
this.numberOfResults = numberOfResults;
@@ -109,6 +162,7 @@ public ProductQuery setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated For better paging support, please use NextPageToken and PageSize */
public ProductQuery setSkipNumberOfResults(Integer skipNumberOfResults)
{
this.skipNumberOfResults = skipNumberOfResults;
@@ -134,4 +188,16 @@ public ProductQuery setExcludeProductsWithNoVariants(Boolean excludeProductsWith
this.excludeProductsWithNoVariants = excludeProductsWithNoVariants;
return this;
}
+ /** The identifier for the ProductQuery
paged cursor, to consume results in PageSize
batches. Leave as null
for retrieving the first page, and set to the value returned in NextPageToken
for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
+ public ProductQuery setNextPageToken(@Nullable UUID nextPageToken)
+ {
+ this.nextPageToken = nextPageToken;
+ return this;
+ }
+ /** The size of the page requested. Maximum allowed value is 1000. */
+ public ProductQuery setPageSize(@Nullable Integer pageSize)
+ {
+ this.pageSize = pageSize;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyFilter.java
new file mode 100644
index 00000000..8ab24950
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyFilter.java
@@ -0,0 +1,113 @@
+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 the products recently purchased by some companies. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyPurchasedByCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyPurchasedByCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The companies that should be evaluated in this filter. */
+ public ArrayList companyIds;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyPurchasedByCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyPurchasedByCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyPurchasedByCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ public static ProductRecentlyPurchasedByCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyPurchasedByCompanyFilter(sinceUtc, negated);
+ }
+ public ProductRecentlyPurchasedByCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyPurchasedByCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ArrayList getCompanyIds()
+ {
+ return this.companyIds;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ProductRecentlyPurchasedByCompanyFilter setCompanyIds(String... companyIds)
+ {
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));;
+ return this;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ProductRecentlyPurchasedByCompanyFilter addToCompanyIds(String companyIds)
+ {
+ if (this.companyIds == null)
+ {
+ this.companyIds = new ArrayList<>();
+ }
+ this.companyIds.add(companyIds);
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyRelevanceModifier.java
new file mode 100644
index 00000000..3974ff31
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByCompanyRelevanceModifier.java
@@ -0,0 +1,152 @@
+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 RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyPurchasedByCompanyRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyPurchasedByCompanyRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyPurchasedByCompanyRelevanceModifier, Relewise.Client";
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by any of the provided companies. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The companies that should be evaluated in this modifier. */
+ public ArrayList companyIds;
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public Double ifPurchasedByCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public Double elseIfNotPurchasedByCompanyMultiplyWeightBy;
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyPurchasedByCompanyRelevanceModifier create(OffsetDateTime sinceUtc, String... companyIds)
+ {
+ return new ProductRecentlyPurchasedByCompanyRelevanceModifier(sinceUtc, companyIds);
+ }
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier(OffsetDateTime sinceUtc, String... companyIds)
+ {
+ this.sinceUtc = sinceUtc;
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));
+ this.ifPurchasedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotPurchasedByCompanyMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if purchased previously by any of the provided companies.
+ * @param companyIds The list of company ids.
+ * @param ifPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by any of the provided companies (since SinceUtc).
+ * @param elseIfNotPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been purchased in the past by any of the provided companies (since SinceUtc).
+ */
+ public static ProductRecentlyPurchasedByCompanyRelevanceModifier create(OffsetDateTime sinceUtc, ArrayList companyIds, Double ifPurchasedByCompanyMultiplyWeightBy, Double elseIfNotPurchasedByCompanyMultiplyWeightBy)
+ {
+ return new ProductRecentlyPurchasedByCompanyRelevanceModifier(sinceUtc, companyIds, ifPurchasedByCompanyMultiplyWeightBy, elseIfNotPurchasedByCompanyMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if purchased previously by any of the provided companies.
+ * @param companyIds The list of company ids.
+ * @param ifPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by any of the provided companies (since SinceUtc).
+ * @param elseIfNotPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been purchased in the past by any of the provided companies (since SinceUtc).
+ */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier(OffsetDateTime sinceUtc, ArrayList companyIds, Double ifPurchasedByCompanyMultiplyWeightBy, Double elseIfNotPurchasedByCompanyMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.companyIds = companyIds;
+ this.ifPurchasedByCompanyMultiplyWeightBy = ifPurchasedByCompanyMultiplyWeightBy;
+ this.elseIfNotPurchasedByCompanyMultiplyWeightBy = elseIfNotPurchasedByCompanyMultiplyWeightBy;
+ }
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier()
+ {
+ this.ifPurchasedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotPurchasedByCompanyMultiplyWeightBy = 1d;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by any of the provided companies. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The companies that should be evaluated in this modifier. */
+ public ArrayList getCompanyIds()
+ {
+ return this.companyIds;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public Double getIfPurchasedByCompanyMultiplyWeightBy()
+ {
+ return this.ifPurchasedByCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public Double getElseIfNotPurchasedByCompanyMultiplyWeightBy()
+ {
+ return this.elseIfNotPurchasedByCompanyMultiplyWeightBy;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by any of the provided companies. */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The companies that should be evaluated in this modifier. */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setCompanyIds(String... companyIds)
+ {
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));;
+ return this;
+ }
+ /** The companies that should be evaluated in this modifier. */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier addToCompanyIds(String companyIds)
+ {
+ if (this.companyIds == null)
+ {
+ this.companyIds = new ArrayList<>();
+ }
+ this.companyIds.add(companyIds);
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setIfPurchasedByCompanyMultiplyWeightBy(Double ifPurchasedByCompanyMultiplyWeightBy)
+ {
+ this.ifPurchasedByCompanyMultiplyWeightBy = ifPurchasedByCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by any of the provided companies (since SinceUtc
). */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setElseIfNotPurchasedByCompanyMultiplyWeightBy(Double elseIfNotPurchasedByCompanyMultiplyWeightBy)
+ {
+ this.elseIfNotPurchasedByCompanyMultiplyWeightBy = elseIfNotPurchasedByCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByCompanyRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyFilter.java
new file mode 100644
index 00000000..c9792304
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyFilter.java
@@ -0,0 +1,100 @@
+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 the products recently purchased by the Company
associated to the User
used in this query. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyPurchasedByUserCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyPurchasedByUserCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByUserCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyPurchasedByUserCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyPurchasedByUserCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyPurchasedByUserCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently purchased by the Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been bought by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public static ProductRecentlyPurchasedByUserCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyPurchasedByUserCompanyFilter(sinceUtc, negated);
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently purchased by the Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been bought by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public ProductRecentlyPurchasedByUserCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyPurchasedByUserCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByUserCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByUserCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByUserCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByUserCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyRelevanceModifier.java
new file mode 100644
index 00000000..5e8dde52
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserCompanyRelevanceModifier.java
@@ -0,0 +1,143 @@
+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 RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyPurchasedByUserCompanyRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyPurchasedByUserCompanyRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyPurchasedByUserCompanyRelevanceModifier, Relewise.Client";
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by their company. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users company (since SinceUtc
). */
+ public Double ifPurchasedByCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users parent company (since SinceUtc
). */
+ public Double elseIfPurchasedByParentCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by the users parent company (since SinceUtc
). */
+ public Double elseIfNotPurchasedByEitherCompanyMultiplyWeightBy;
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyPurchasedByUserCompanyRelevanceModifier create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyPurchasedByUserCompanyRelevanceModifier(sinceUtc);
+ }
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPurchasedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfPurchasedByParentCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotPurchasedByEitherCompanyMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if purchased previously by their company.
+ * @param ifPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by the users company (since SinceUtc).
+ * @param elseIfPurchasedByParentCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by the users parent company (since SinceUtc).
+ * @param elseIfNotPurchasedByEitherCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been purchased in the past by the users parent company (since SinceUtc).
+ */
+ public static ProductRecentlyPurchasedByUserCompanyRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPurchasedByCompanyMultiplyWeightBy, Double elseIfPurchasedByParentCompanyMultiplyWeightBy, Double elseIfNotPurchasedByEitherCompanyMultiplyWeightBy)
+ {
+ return new ProductRecentlyPurchasedByUserCompanyRelevanceModifier(sinceUtc, ifPurchasedByCompanyMultiplyWeightBy, elseIfPurchasedByParentCompanyMultiplyWeightBy, elseIfNotPurchasedByEitherCompanyMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have purchased this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if purchased previously by their company.
+ * @param ifPurchasedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by the users company (since SinceUtc).
+ * @param elseIfPurchasedByParentCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been purchased in the past by the users parent company (since SinceUtc).
+ * @param elseIfNotPurchasedByEitherCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been purchased in the past by the users parent company (since SinceUtc).
+ */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier(OffsetDateTime sinceUtc, Double ifPurchasedByCompanyMultiplyWeightBy, Double elseIfPurchasedByParentCompanyMultiplyWeightBy, Double elseIfNotPurchasedByEitherCompanyMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifPurchasedByCompanyMultiplyWeightBy = ifPurchasedByCompanyMultiplyWeightBy;
+ this.elseIfPurchasedByParentCompanyMultiplyWeightBy = elseIfPurchasedByParentCompanyMultiplyWeightBy;
+ this.elseIfNotPurchasedByEitherCompanyMultiplyWeightBy = elseIfNotPurchasedByEitherCompanyMultiplyWeightBy;
+ }
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier()
+ {
+ this.ifPurchasedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfPurchasedByParentCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotPurchasedByEitherCompanyMultiplyWeightBy = 1d;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by their company. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users company (since SinceUtc
). */
+ public Double getIfPurchasedByCompanyMultiplyWeightBy()
+ {
+ return this.ifPurchasedByCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users parent company (since SinceUtc
). */
+ public Double getElseIfPurchasedByParentCompanyMultiplyWeightBy()
+ {
+ return this.elseIfPurchasedByParentCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by the users parent company (since SinceUtc
). */
+ public Double getElseIfNotPurchasedByEitherCompanyMultiplyWeightBy()
+ {
+ return this.elseIfNotPurchasedByEitherCompanyMultiplyWeightBy;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if purchased previously by their company. */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users company (since SinceUtc
). */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setIfPurchasedByCompanyMultiplyWeightBy(Double ifPurchasedByCompanyMultiplyWeightBy)
+ {
+ this.ifPurchasedByCompanyMultiplyWeightBy = ifPurchasedByCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been purchased in the past by the users parent company (since SinceUtc
). */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setElseIfPurchasedByParentCompanyMultiplyWeightBy(Double elseIfPurchasedByParentCompanyMultiplyWeightBy)
+ {
+ this.elseIfPurchasedByParentCompanyMultiplyWeightBy = elseIfPurchasedByParentCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has not been purchased in the past by the users parent company (since SinceUtc
). */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setElseIfNotPurchasedByEitherCompanyMultiplyWeightBy(Double elseIfNotPurchasedByEitherCompanyMultiplyWeightBy)
+ {
+ this.elseIfNotPurchasedByEitherCompanyMultiplyWeightBy = elseIfNotPurchasedByEitherCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByUserCompanyRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserFilter.java
index 758d758c..19d689dd 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserFilter.java
@@ -26,7 +26,8 @@
public class ProductRecentlyPurchasedByUserFilter extends Filter implements IProductFilter
{
public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByUserFilter, Relewise.Client";
- public OffsetDateTime sinceUtc;
+ public @Nullable OffsetDateTime sinceUtc;
+ public @Nullable Integer sinceMinutesAgo;
public static ProductRecentlyPurchasedByUserFilter create(OffsetDateTime sinceUtc)
{
return new ProductRecentlyPurchasedByUserFilter(sinceUtc);
@@ -49,19 +50,34 @@ public ProductRecentlyPurchasedByUserFilter()
{
this.negated = false;
}
- public OffsetDateTime getSinceUtc()
+ public @Nullable OffsetDateTime getSinceUtc()
{
return this.sinceUtc;
}
- public ProductRecentlyPurchasedByUserFilter setSinceUtc(OffsetDateTime sinceUtc)
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ public ProductRecentlyPurchasedByUserFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
{
this.sinceUtc = sinceUtc;
return this;
}
+ public ProductRecentlyPurchasedByUserFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
@Override
public ProductRecentlyPurchasedByUserFilter setNegated(Boolean negated)
{
this.negated = negated;
return this;
}
+ @Override
+ public ProductRecentlyPurchasedByUserFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserParentCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserParentCompanyFilter.java
new file mode 100644
index 00000000..2a6d6eb9
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserParentCompanyFilter.java
@@ -0,0 +1,100 @@
+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 the products recently purchased by the parent Company
associated to the User
used in this query. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyPurchasedByUserParentCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyPurchasedByUserParentCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyPurchasedByUserParentCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyPurchasedByUserParentCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyPurchasedByUserParentCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyPurchasedByUserParentCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently purchased by the parent Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been bought by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public static ProductRecentlyPurchasedByUserParentCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyPurchasedByUserParentCompanyFilter(sinceUtc, negated);
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently purchased by the parent Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been bought by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public ProductRecentlyPurchasedByUserParentCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyPurchasedByUserParentCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been bought by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByUserParentCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyPurchasedByUserParentCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByUserParentCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyPurchasedByUserParentCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java
index bb4d21df..e32432cc 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on whether they have bought this product within some timespan. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,14 @@
public class ProductRecentlyPurchasedByUserRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyPurchasedByUserRelevanceModifier, Relewise.Client";
- public OffsetDateTime sinceUtc;
+ /** The start of the time period in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The weight that the Product will be multiplied with if it has been bought in the past by the user (since SinceUtc
). */
public Double ifPreviouslyPurchasedByUserMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has not been bought in the past by the user (since SinceUtc
). */
public Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy;
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
public static ProductRecentlyPurchasedByUserRelevanceModifier create(OffsetDateTime sinceUtc)
{
return new ProductRecentlyPurchasedByUserRelevanceModifier(sinceUtc);
@@ -39,12 +45,22 @@ public ProductRecentlyPurchasedByUserRelevanceModifier(OffsetDateTime sinceUtc)
this.ifPreviouslyPurchasedByUserMultiplyWeightBy = 1d;
this.ifNotPreviouslyPurchasedByUserMultiplyWeightBy = 1d;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether they have bought this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if bought previously by them.
+ * @param ifPreviouslyPurchasedByUserMultiplyWeightBy The weight that the Product will be multiplied with if it has been bought in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyPurchasedByUserMultiplyWeightBy The weight that the Product will be multiplied with if it has not been bought in the past by the user (since SinceUtc).
+ */
public static ProductRecentlyPurchasedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyPurchasedByUserMultiplyWeightBy, Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy)
{
return new ProductRecentlyPurchasedByUserRelevanceModifier(sinceUtc, ifPreviouslyPurchasedByUserMultiplyWeightBy, ifNotPreviouslyPurchasedByUserMultiplyWeightBy);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether they have bought this product within some timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if bought previously by them.
+ * @param ifPreviouslyPurchasedByUserMultiplyWeightBy The weight that the Product will be multiplied with if it has been bought in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyPurchasedByUserMultiplyWeightBy The weight that the Product will be multiplied with if it has not been bought in the past by the user (since SinceUtc).
+ */
public ProductRecentlyPurchasedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyPurchasedByUserMultiplyWeightBy, Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy)
{
this.sinceUtc = sinceUtc;
@@ -56,33 +72,50 @@ public ProductRecentlyPurchasedByUserRelevanceModifier()
this.ifPreviouslyPurchasedByUserMultiplyWeightBy = 1d;
this.ifNotPreviouslyPurchasedByUserMultiplyWeightBy = 1d;
}
- public OffsetDateTime getSinceUtc()
+ /** The start of the time period in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable OffsetDateTime getSinceUtc()
{
return this.sinceUtc;
}
+ /** The weight that the Product will be multiplied with if it has been bought in the past by the user (since SinceUtc
). */
public Double getIfPreviouslyPurchasedByUserMultiplyWeightBy()
{
return this.ifPreviouslyPurchasedByUserMultiplyWeightBy;
}
+ /** The weight that the Product will be multiplied with if it has not been bought in the past by the user (since SinceUtc
). */
public Double getIfNotPreviouslyPurchasedByUserMultiplyWeightBy()
{
return this.ifNotPreviouslyPurchasedByUserMultiplyWeightBy;
}
- public ProductRecentlyPurchasedByUserRelevanceModifier setSinceUtc(OffsetDateTime sinceUtc)
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if bought previously by them. */
+ public ProductRecentlyPurchasedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
{
this.sinceUtc = sinceUtc;
return this;
}
+ /** The weight that the Product will be multiplied with if it has been bought in the past by the user (since SinceUtc
). */
public ProductRecentlyPurchasedByUserRelevanceModifier setIfPreviouslyPurchasedByUserMultiplyWeightBy(Double ifPreviouslyPurchasedByUserMultiplyWeightBy)
{
this.ifPreviouslyPurchasedByUserMultiplyWeightBy = ifPreviouslyPurchasedByUserMultiplyWeightBy;
return this;
}
+ /** The weight that the Product will be multiplied with if it has not been bought in the past by the user (since SinceUtc
). */
public ProductRecentlyPurchasedByUserRelevanceModifier setIfNotPreviouslyPurchasedByUserMultiplyWeightBy(Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy)
{
this.ifNotPreviouslyPurchasedByUserMultiplyWeightBy = ifNotPreviouslyPurchasedByUserMultiplyWeightBy;
return this;
}
+ /** The minutes since in which a product will be considered relevant to the user if bought previously by them. */
+ public ProductRecentlyPurchasedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
@Override
public ProductRecentlyPurchasedByUserRelevanceModifier setFilters(FilterCollection filters)
{
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyFilter.java
new file mode 100644
index 00000000..46cdf5c6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyFilter.java
@@ -0,0 +1,113 @@
+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 the products recently viewed by some companies. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyViewedByCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyViewedByCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The companies that should be evaluated in this filter. */
+ public ArrayList companyIds;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyViewedByCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyViewedByCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyViewedByCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ public static ProductRecentlyViewedByCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyViewedByCompanyFilter(sinceUtc, negated);
+ }
+ public ProductRecentlyViewedByCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyViewedByCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ArrayList getCompanyIds()
+ {
+ return this.companyIds;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ProductRecentlyViewedByCompanyFilter setCompanyIds(String... companyIds)
+ {
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));;
+ return this;
+ }
+ /** The companies that should be evaluated in this filter. */
+ public ProductRecentlyViewedByCompanyFilter addToCompanyIds(String companyIds)
+ {
+ if (this.companyIds == null)
+ {
+ this.companyIds = new ArrayList<>();
+ }
+ this.companyIds.add(companyIds);
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyRelevanceModifier.java
new file mode 100644
index 00000000..e8a56d97
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByCompanyRelevanceModifier.java
@@ -0,0 +1,152 @@
+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 RelevanceModifier
that can change the relevance of a Product depending on whether the product has been viewed by any of the provided companies within the provided timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyViewedByCompanyRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyViewedByCompanyRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByCompanyRelevanceModifier, Relewise.Client";
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by any of the provided companies. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The list of companies. */
+ public ArrayList companyIds;
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by any of the provided companies (since SinceUtc
). */
+ public Double ifViewedByCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users company (since SinceUtc
). */
+ public Double elseIfNotViewedByCompanyMultiplyWeightBy;
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyViewedByCompanyRelevanceModifier create(OffsetDateTime sinceUtc, String... companyIds)
+ {
+ return new ProductRecentlyViewedByCompanyRelevanceModifier(sinceUtc, companyIds);
+ }
+ public ProductRecentlyViewedByCompanyRelevanceModifier(OffsetDateTime sinceUtc, String... companyIds)
+ {
+ this.sinceUtc = sinceUtc;
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));
+ this.ifViewedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotViewedByCompanyMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the product has been viewed by any of the provided companies within the provided timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if viewed previously by any of the provided companies.
+ * @param companyIds The single company that should be evaluated in this filter.
+ * @param ifViewedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by any of the provided companies (since SinceUtc).
+ * @param elseIfNotViewedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been viewed in the past by the users company (since SinceUtc).
+ */
+ public static ProductRecentlyViewedByCompanyRelevanceModifier create(OffsetDateTime sinceUtc, ArrayList companyIds, Double ifViewedByCompanyMultiplyWeightBy, Double elseIfNotViewedByCompanyMultiplyWeightBy)
+ {
+ return new ProductRecentlyViewedByCompanyRelevanceModifier(sinceUtc, companyIds, ifViewedByCompanyMultiplyWeightBy, elseIfNotViewedByCompanyMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the product has been viewed by any of the provided companies within the provided timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if viewed previously by any of the provided companies.
+ * @param companyIds The single company that should be evaluated in this filter.
+ * @param ifViewedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by any of the provided companies (since SinceUtc).
+ * @param elseIfNotViewedByCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been viewed in the past by the users company (since SinceUtc).
+ */
+ public ProductRecentlyViewedByCompanyRelevanceModifier(OffsetDateTime sinceUtc, ArrayList companyIds, Double ifViewedByCompanyMultiplyWeightBy, Double elseIfNotViewedByCompanyMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.companyIds = companyIds;
+ this.ifViewedByCompanyMultiplyWeightBy = ifViewedByCompanyMultiplyWeightBy;
+ this.elseIfNotViewedByCompanyMultiplyWeightBy = elseIfNotViewedByCompanyMultiplyWeightBy;
+ }
+ public ProductRecentlyViewedByCompanyRelevanceModifier()
+ {
+ this.ifViewedByCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotViewedByCompanyMultiplyWeightBy = 1d;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by any of the provided companies. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The list of companies. */
+ public ArrayList getCompanyIds()
+ {
+ return this.companyIds;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by any of the provided companies (since SinceUtc
). */
+ public Double getIfViewedByCompanyMultiplyWeightBy()
+ {
+ return this.ifViewedByCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users company (since SinceUtc
). */
+ public Double getElseIfNotViewedByCompanyMultiplyWeightBy()
+ {
+ return this.elseIfNotViewedByCompanyMultiplyWeightBy;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by any of the provided companies. */
+ public ProductRecentlyViewedByCompanyRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The list of companies. */
+ public ProductRecentlyViewedByCompanyRelevanceModifier setCompanyIds(String... companyIds)
+ {
+ this.companyIds = new ArrayList<>(Arrays.asList(companyIds));;
+ return this;
+ }
+ /** The list of companies. */
+ public ProductRecentlyViewedByCompanyRelevanceModifier addToCompanyIds(String companyIds)
+ {
+ if (this.companyIds == null)
+ {
+ this.companyIds = new ArrayList<>();
+ }
+ this.companyIds.add(companyIds);
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by any of the provided companies (since SinceUtc
). */
+ public ProductRecentlyViewedByCompanyRelevanceModifier setIfViewedByCompanyMultiplyWeightBy(Double ifViewedByCompanyMultiplyWeightBy)
+ {
+ this.ifViewedByCompanyMultiplyWeightBy = ifViewedByCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users company (since SinceUtc
). */
+ public ProductRecentlyViewedByCompanyRelevanceModifier setElseIfNotViewedByCompanyMultiplyWeightBy(Double elseIfNotViewedByCompanyMultiplyWeightBy)
+ {
+ this.elseIfNotViewedByCompanyMultiplyWeightBy = elseIfNotViewedByCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public ProductRecentlyViewedByCompanyRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByCompanyRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyFilter.java
new file mode 100644
index 00000000..af74f6b0
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyFilter.java
@@ -0,0 +1,100 @@
+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 the products recently viewed by the Company
associated to the User
used in this query. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyViewedByUserCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyViewedByUserCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByUserCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyViewedByUserCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyViewedByUserCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyViewedByUserCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently viewed by the Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been viewed by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public static ProductRecentlyViewedByUserCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyViewedByUserCompanyFilter(sinceUtc, negated);
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently viewed by the Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been viewed by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public ProductRecentlyViewedByUserCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyViewedByUserCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByUserCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByUserCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByUserCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByUserCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyRelevanceModifier.java
new file mode 100644
index 00000000..81b80c51
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserCompanyRelevanceModifier.java
@@ -0,0 +1,143 @@
+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 RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have viewed this product within the provided timespan. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyViewedByUserCompanyRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyViewedByUserCompanyRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByUserCompanyRelevanceModifier, Relewise.Client";
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by their company. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users company (since SinceUtc
). */
+ public Double ifViewedByUserCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users parent company (since SinceUtc
). */
+ public Double elseIfViewedByUserParentCompanyMultiplyWeightBy;
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users parent company (since SinceUtc
). */
+ public Double elseIfNotViewedByEitherCompanyMultiplyWeightBy;
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyViewedByUserCompanyRelevanceModifier create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyViewedByUserCompanyRelevanceModifier(sinceUtc);
+ }
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifViewedByUserCompanyMultiplyWeightBy = 1d;
+ this.elseIfViewedByUserParentCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotViewedByEitherCompanyMultiplyWeightBy = 1d;
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have viewed this product within the provided timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if viewed previously by their company.
+ * @param ifViewedByUserCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by the users company (since SinceUtc).
+ * @param elseIfViewedByUserParentCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by the users parent company (since SinceUtc).
+ * @param elseIfNotViewedByEitherCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been viewed in the past by the users parent company (since SinceUtc).
+ */
+ public static ProductRecentlyViewedByUserCompanyRelevanceModifier create(OffsetDateTime sinceUtc, Double ifViewedByUserCompanyMultiplyWeightBy, Double elseIfViewedByUserParentCompanyMultiplyWeightBy, Double elseIfNotViewedByEitherCompanyMultiplyWeightBy)
+ {
+ return new ProductRecentlyViewedByUserCompanyRelevanceModifier(sinceUtc, ifViewedByUserCompanyMultiplyWeightBy, elseIfViewedByUserParentCompanyMultiplyWeightBy, elseIfNotViewedByEitherCompanyMultiplyWeightBy);
+ }
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether the users company or parent company have viewed this product within the provided timespan.
+ * @param sinceUtc The start of the time period in which a product will be considered relevant to the user if viewed previously by their company.
+ * @param ifViewedByUserCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by the users company (since SinceUtc).
+ * @param elseIfViewedByUserParentCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has been viewed in the past by the users parent company (since SinceUtc).
+ * @param elseIfNotViewedByEitherCompanyMultiplyWeightBy The weight that the Product will be multiplied with if it has not been viewed in the past by the users parent company (since SinceUtc).
+ */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier(OffsetDateTime sinceUtc, Double ifViewedByUserCompanyMultiplyWeightBy, Double elseIfViewedByUserParentCompanyMultiplyWeightBy, Double elseIfNotViewedByEitherCompanyMultiplyWeightBy)
+ {
+ this.sinceUtc = sinceUtc;
+ this.ifViewedByUserCompanyMultiplyWeightBy = ifViewedByUserCompanyMultiplyWeightBy;
+ this.elseIfViewedByUserParentCompanyMultiplyWeightBy = elseIfViewedByUserParentCompanyMultiplyWeightBy;
+ this.elseIfNotViewedByEitherCompanyMultiplyWeightBy = elseIfNotViewedByEitherCompanyMultiplyWeightBy;
+ }
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier()
+ {
+ this.ifViewedByUserCompanyMultiplyWeightBy = 1d;
+ this.elseIfViewedByUserParentCompanyMultiplyWeightBy = 1d;
+ this.elseIfNotViewedByEitherCompanyMultiplyWeightBy = 1d;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by their company. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users company (since SinceUtc
). */
+ public Double getIfViewedByUserCompanyMultiplyWeightBy()
+ {
+ return this.ifViewedByUserCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users parent company (since SinceUtc
). */
+ public Double getElseIfViewedByUserParentCompanyMultiplyWeightBy()
+ {
+ return this.elseIfViewedByUserParentCompanyMultiplyWeightBy;
+ }
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users parent company (since SinceUtc
). */
+ public Double getElseIfNotViewedByEitherCompanyMultiplyWeightBy()
+ {
+ return this.elseIfNotViewedByEitherCompanyMultiplyWeightBy;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which a product will be considered relevant to the user if viewed previously by their company. */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users company (since SinceUtc
). */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setIfViewedByUserCompanyMultiplyWeightBy(Double ifViewedByUserCompanyMultiplyWeightBy)
+ {
+ this.ifViewedByUserCompanyMultiplyWeightBy = ifViewedByUserCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has been viewed in the past by the users parent company (since SinceUtc
). */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setElseIfViewedByUserParentCompanyMultiplyWeightBy(Double elseIfViewedByUserParentCompanyMultiplyWeightBy)
+ {
+ this.elseIfViewedByUserParentCompanyMultiplyWeightBy = elseIfViewedByUserParentCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the Product will be multiplied with if it has not been viewed in the past by the users parent company (since SinceUtc
). */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setElseIfNotViewedByEitherCompanyMultiplyWeightBy(Double elseIfNotViewedByEitherCompanyMultiplyWeightBy)
+ {
+ this.elseIfNotViewedByEitherCompanyMultiplyWeightBy = elseIfNotViewedByEitherCompanyMultiplyWeightBy;
+ return this;
+ }
+ /** The minutes since in which a product will be considered relevant to the user if viewed previously by them. */
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByUserCompanyRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserFilter.java
index 98073c2b..f06bd2e9 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserFilter.java
@@ -26,7 +26,8 @@
public class ProductRecentlyViewedByUserFilter extends Filter implements IProductFilter
{
public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByUserFilter, Relewise.Client";
- public OffsetDateTime sinceUtc;
+ public @Nullable OffsetDateTime sinceUtc;
+ public @Nullable Integer sinceMinutesAgo;
public static ProductRecentlyViewedByUserFilter create(OffsetDateTime sinceUtc)
{
return new ProductRecentlyViewedByUserFilter(sinceUtc);
@@ -49,19 +50,34 @@ public ProductRecentlyViewedByUserFilter()
{
this.negated = false;
}
- public OffsetDateTime getSinceUtc()
+ public @Nullable OffsetDateTime getSinceUtc()
{
return this.sinceUtc;
}
- public ProductRecentlyViewedByUserFilter setSinceUtc(OffsetDateTime sinceUtc)
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ public ProductRecentlyViewedByUserFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
{
this.sinceUtc = sinceUtc;
return this;
}
+ public ProductRecentlyViewedByUserFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
@Override
public ProductRecentlyViewedByUserFilter setNegated(Boolean negated)
{
this.negated = negated;
return this;
}
+ @Override
+ public ProductRecentlyViewedByUserFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserParentCompanyFilter.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserParentCompanyFilter.java
new file mode 100644
index 00000000..e8a47d63
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserParentCompanyFilter.java
@@ -0,0 +1,100 @@
+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 the products recently viewed by the parent Company
associated to the User
used in this query. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ProductRecentlyViewedByUserParentCompanyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ProductRecentlyViewedByUserParentCompanyFilter extends Filter implements IProductFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.ProductRecentlyViewedByUserParentCompanyFilter, Relewise.Client";
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer sinceMinutesAgo;
+ public static ProductRecentlyViewedByUserParentCompanyFilter create(OffsetDateTime sinceUtc)
+ {
+ return new ProductRecentlyViewedByUserParentCompanyFilter(sinceUtc);
+ }
+ public ProductRecentlyViewedByUserParentCompanyFilter(OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = false;
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently viewed by the parent Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been viewed by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public static ProductRecentlyViewedByUserParentCompanyFilter create(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ return new ProductRecentlyViewedByUserParentCompanyFilter(sinceUtc, negated);
+ }
+ /**
+ * Creates a Filter
that can filter on the products recently viewed by the parent Company
associated to the User
used in this query.
+ * @param sinceUtc The time from which a Product should have been viewed by any of the companies to be included by the filter.
+ * @param negated Defines whether the Filter should exclude the matching entities instead of including the matching entities.
+ */
+ public ProductRecentlyViewedByUserParentCompanyFilter(OffsetDateTime sinceUtc, Boolean negated)
+ {
+ this.sinceUtc = sinceUtc;
+ this.negated = negated;
+ }
+ public ProductRecentlyViewedByUserParentCompanyFilter()
+ {
+ this.negated = false;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The time from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByUserParentCompanyFilter setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The time in minutes from which a Product
should have been viewed by any of the companies to be included by the filter. */
+ public ProductRecentlyViewedByUserParentCompanyFilter setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByUserParentCompanyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public ProductRecentlyViewedByUserParentCompanyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java
index 66afe547..3b2a6ecf 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java
@@ -17,18 +17,16 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on whether they have viewed this product within some timespan. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "$type",
defaultImpl = ProductRecentlyViewedByUserRelevanceModifier.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ProductRecentlyViewedByUserRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
+public class ProductRecentlyViewedByUserRelevanceModifier extends RecentlyViewedByUserRelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByUserRelevanceModifier, Relewise.Client";
- public OffsetDateTime sinceUtc;
- public Double ifPreviouslyViewedByUserMultiplyWeightBy;
- public Double ifNotPreviouslyViewedByUserMultiplyWeightBy;
public static ProductRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc)
{
return new ProductRecentlyViewedByUserRelevanceModifier(sinceUtc);
@@ -39,12 +37,22 @@ public ProductRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc)
this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether they have viewed this product within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
public static ProductRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
{
return new ProductRecentlyViewedByUserRelevanceModifier(sinceUtc, ifPreviouslyViewedByUserMultiplyWeightBy, ifNotPreviouslyViewedByUserMultiplyWeightBy);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether they have viewed this product within some timespan.
+ * @param sinceUtc The start of the time period in which an entity will be considered relevant to the user if viewed previously by them.
+ * @param ifPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc).
+ * @param ifNotPreviouslyViewedByUserMultiplyWeightBy The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc).
+ */
public ProductRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
{
this.sinceUtc = sinceUtc;
@@ -56,34 +64,31 @@ public ProductRecentlyViewedByUserRelevanceModifier()
this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d;
this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d;
}
- public OffsetDateTime getSinceUtc()
- {
- return this.sinceUtc;
- }
- public Double getIfPreviouslyViewedByUserMultiplyWeightBy()
- {
- return this.ifPreviouslyViewedByUserMultiplyWeightBy;
- }
- public Double getIfNotPreviouslyViewedByUserMultiplyWeightBy()
- {
- return this.ifNotPreviouslyViewedByUserMultiplyWeightBy;
- }
- public ProductRecentlyViewedByUserRelevanceModifier setSinceUtc(OffsetDateTime sinceUtc)
+ @Override
+ public ProductRecentlyViewedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
{
this.sinceUtc = sinceUtc;
return this;
}
+ @Override
public ProductRecentlyViewedByUserRelevanceModifier setIfPreviouslyViewedByUserMultiplyWeightBy(Double ifPreviouslyViewedByUserMultiplyWeightBy)
{
this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
return this;
}
+ @Override
public ProductRecentlyViewedByUserRelevanceModifier setIfNotPreviouslyViewedByUserMultiplyWeightBy(Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
{
this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
return this;
}
@Override
+ public ProductRecentlyViewedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
public ProductRecentlyViewedByUserRelevanceModifier setFilters(FilterCollection filters)
{
this.filters = filters;
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/ProductRecommendationRequest.java
index f1440450..cf2e83b6 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecommendationRequest.java
@@ -86,4 +86,11 @@ public ProductRecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductRecommendationRequestSettings.java b/src/src/main/java/com/relewise/client/model/ProductRecommendationRequestSettings.java
index 8552c2dd..5710c24b 100644
--- a/src/src/main/java/com/relewise/client/model/ProductRecommendationRequestSettings.java
+++ b/src/src/main/java/com/relewise/client/model/ProductRecommendationRequestSettings.java
@@ -29,6 +29,7 @@ public class ProductRecommendationRequestSettings
public Boolean prioritizeDiversityBetweenRequests;
public @Nullable Boolean allowProductsCurrentlyInCart;
public @Nullable SelectedBrandPropertiesSettings selectedBrandProperties;
+ public @Nullable Integer prioritizeResultsNotRecommendedWithinSeconds;
public static ProductRecommendationRequestSettings create()
{
return new ProductRecommendationRequestSettings();
@@ -72,6 +73,10 @@ public Boolean getPrioritizeDiversityBetweenRequests()
{
return this.selectedBrandProperties;
}
+ public @Nullable Integer getPrioritizeResultsNotRecommendedWithinSeconds()
+ {
+ return this.prioritizeResultsNotRecommendedWithinSeconds;
+ }
public ProductRecommendationRequestSettings setNumberOfRecommendations(Integer numberOfRecommendations)
{
this.numberOfRecommendations = numberOfRecommendations;
@@ -117,4 +122,9 @@ public ProductRecommendationRequestSettings setSelectedBrandProperties(SelectedB
this.selectedBrandProperties = selectedBrandProperties;
return this;
}
+ public ProductRecommendationRequestSettings setPrioritizeResultsNotRecommendedWithinSeconds(@Nullable Integer prioritizeResultsNotRecommendedWithinSeconds)
+ {
+ this.prioritizeResultsNotRecommendedWithinSeconds = prioritizeResultsNotRecommendedWithinSeconds;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductResult.java b/src/src/main/java/com/relewise/client/model/ProductResult.java
index 13041f22..16bc6158 100644
--- a/src/src/main/java/com/relewise/client/model/ProductResult.java
+++ b/src/src/main/java/com/relewise/client/model/ProductResult.java
@@ -33,6 +33,9 @@ public class ProductResult
public @Nullable Double salesPrice;
public BrandResult brand;
public VariantResult[] allVariants;
+ public PurchasedByUserCompanyInfo purchasedByUserCompany;
+ public ViewedByUserCompanyInfo viewedByUserCompany;
+ public VariantResult[] filteredVariants;
public static ProductResult create(String productId, Integer rank)
{
return new ProductResult(productId, rank);
@@ -97,6 +100,18 @@ public VariantResult[] getAllVariants()
{
return this.allVariants;
}
+ public PurchasedByUserCompanyInfo getPurchasedByUserCompany()
+ {
+ return this.purchasedByUserCompany;
+ }
+ public ViewedByUserCompanyInfo getViewedByUserCompany()
+ {
+ return this.viewedByUserCompany;
+ }
+ public VariantResult[] getFilteredVariants()
+ {
+ return this.filteredVariants;
+ }
public ProductResult setProductId(String productId)
{
this.productId = productId;
@@ -213,4 +228,33 @@ public ProductResult addToAllVariants(VariantResult allVariant)
}
return this;
}
+ public ProductResult setPurchasedByUserCompany(PurchasedByUserCompanyInfo purchasedByUserCompany)
+ {
+ this.purchasedByUserCompany = purchasedByUserCompany;
+ return this;
+ }
+ public ProductResult setViewedByUserCompany(ViewedByUserCompanyInfo viewedByUserCompany)
+ {
+ this.viewedByUserCompany = viewedByUserCompany;
+ return this;
+ }
+ public ProductResult setFilteredVariants(VariantResult... filteredVariants)
+ {
+ this.filteredVariants = filteredVariants;
+ return this;
+ }
+ public ProductResult addToFilteredVariants(VariantResult filteredVariant)
+ {
+ if (this.filteredVariants == null)
+ {
+ this.filteredVariants = new VariantResult[] { filteredVariant };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.filteredVariants));
+ existingList.add(filteredVariant);
+ this.filteredVariants = existingList.toArray(new VariantResult[0]);
+ }
+ 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 aa56a7c7..43b98b1c 100644
--- a/src/src/main/java/com/relewise/client/model/ProductResultDetails.java
+++ b/src/src/main/java/com/relewise/client/model/ProductResultDetails.java
@@ -41,6 +41,7 @@ public class ProductResultDetails
public MultiCurrency listPrice;
public MultiCurrency salesPrice;
public BrandResultDetails brand;
+ public VariantResultDetails[] filteredVariants;
public static ProductResultDetails create(String productId)
{
return new ProductResultDetails(productId);
@@ -136,6 +137,10 @@ public BrandResultDetails getBrand()
{
return this.brand;
}
+ public VariantResultDetails[] getFilteredVariants()
+ {
+ return this.filteredVariants;
+ }
public ProductResultDetails setProductId(String productId)
{
this.productId = productId;
@@ -292,4 +297,23 @@ public ProductResultDetails setBrand(BrandResultDetails brand)
this.brand = brand;
return this;
}
+ public ProductResultDetails setFilteredVariants(VariantResultDetails... filteredVariants)
+ {
+ this.filteredVariants = filteredVariants;
+ return this;
+ }
+ public ProductResultDetails addToFilteredVariants(VariantResultDetails filteredVariant)
+ {
+ if (this.filteredVariants == null)
+ {
+ this.filteredVariants = new VariantResultDetails[] { filteredVariant };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.filteredVariants));
+ existingList.add(filteredVariant);
+ this.filteredVariants = existingList.toArray(new VariantResultDetails[0]);
+ }
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductSalesPriceFilter.java b/src/src/main/java/com/relewise/client/model/ProductSalesPriceFilter.java
index 99d8358f..6336da19 100644
--- a/src/src/main/java/com/relewise/client/model/ProductSalesPriceFilter.java
+++ b/src/src/main/java/com/relewise/client/model/ProductSalesPriceFilter.java
@@ -77,4 +77,10 @@ public ProductSalesPriceFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public ProductSalesPriceFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java
index ca6525ca..772dab9b 100644
--- a/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on the sales price falling within a specific Range
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class ProductSalesPriceRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductSalesPriceRelevanceModifier, Relewise.Client";
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public DoubleRange range;
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency currency;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean negated;
public static ProductSalesPriceRelevanceModifier create(DoubleRange range)
{
@@ -41,12 +46,24 @@ public ProductSalesPriceRelevanceModifier(DoubleRange range)
this.currency = null;
this.negated = false;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on the sales price falling within a specific Range
.
+ * @param range The range of sales prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public static ProductSalesPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
return new ProductSalesPriceRelevanceModifier(range, multiplyWeightBy, currency, negated);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on the sales price falling within a specific Range
.
+ * @param range The range of sales prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public ProductSalesPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
this.range = range;
@@ -60,37 +77,45 @@ public ProductSalesPriceRelevanceModifier()
this.multiplyWeightBy = 1d;
this.negated = false;
}
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public DoubleRange getRange()
{
return this.range;
}
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency getCurrency()
{
return this.currency;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public ProductSalesPriceRelevanceModifier setRange(DoubleRange range)
{
this.range = range;
return this;
}
+ /** The currency that is used to distinguish the price. */
public ProductSalesPriceRelevanceModifier setCurrency(Currency currency)
{
this.currency = currency;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public ProductSalesPriceRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public ProductSalesPriceRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/ProductSearchRequest.java b/src/src/main/java/com/relewise/client/model/ProductSearchRequest.java
index 9d61b03e..95846546 100644
--- a/src/src/main/java/com/relewise/client/model/ProductSearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductSearchRequest.java
@@ -30,6 +30,7 @@ public class ProductSearchRequest extends PaginatedSearchRequest implements IUse
public @Nullable ProductFacetQuery facets;
public @Nullable ProductSearchSettings settings;
public @Nullable ProductSortBySpecification sorting;
+ public @Nullable RetailMediaQuery retailMedia;
public static ProductSearchRequest create(@Nullable Language language, @Nullable Currency currency, @Nullable SearchIndexSelector indexSelector, User user, String displayedAtLocation, @Nullable String term, Integer skip, Integer take)
{
return new ProductSearchRequest(language, currency, indexSelector, user, displayedAtLocation, term, skip, take);
@@ -78,6 +79,10 @@ public ProductSearchRequest()
{
return this.sorting;
}
+ public @Nullable RetailMediaQuery getRetailMedia()
+ {
+ return this.retailMedia;
+ }
public ProductSearchRequest setTerm(String term)
{
this.term = term;
@@ -98,6 +103,11 @@ public ProductSearchRequest setSorting(ProductSortBySpecification sorting)
this.sorting = sorting;
return this;
}
+ public ProductSearchRequest setRetailMedia(RetailMediaQuery retailMedia)
+ {
+ this.retailMedia = retailMedia;
+ return this;
+ }
@Override
public ProductSearchRequest setSkip(Integer skip)
{
@@ -158,4 +168,11 @@ public ProductSearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductSearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductSearchResponse.java b/src/src/main/java/com/relewise/client/model/ProductSearchResponse.java
index d82c2026..47a9112a 100644
--- a/src/src/main/java/com/relewise/client/model/ProductSearchResponse.java
+++ b/src/src/main/java/com/relewise/client/model/ProductSearchResponse.java
@@ -30,6 +30,7 @@ public class ProductSearchResponse extends PaginatedSearchResponse
public ProductFacetResult facets;
public ProductResult[] recommendations;
public RedirectResult[] redirects;
+ public RetailMediaResult retailMedia;
public static ProductSearchResponse create()
{
return new ProductSearchResponse();
@@ -53,6 +54,10 @@ public RedirectResult[] getRedirects()
{
return this.redirects;
}
+ public RetailMediaResult getRetailMedia()
+ {
+ return this.retailMedia;
+ }
public ProductSearchResponse setResults(ProductResult... results)
{
this.results = results;
@@ -115,6 +120,11 @@ public ProductSearchResponse addToRedirects(RedirectResult redirect)
}
return this;
}
+ public ProductSearchResponse setRetailMedia(RetailMediaResult retailMedia)
+ {
+ this.retailMedia = retailMedia;
+ return this;
+ }
@Override
public ProductSearchResponse setHits(Integer hits)
{
diff --git a/src/src/main/java/com/relewise/client/model/ProductSearchResultConstraint.java b/src/src/main/java/com/relewise/client/model/ProductSearchResultConstraint.java
new file mode 100644
index 00000000..c9783de0
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ProductSearchResultConstraint.java
@@ -0,0 +1,31 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ResultMustHaveVariantConstraint.class, name = "Relewise.Client.Requests.Search.Settings.ResultMustHaveVariantConstraint, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class ProductSearchResultConstraint
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java b/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java
index bbc13dbb..0338ff94 100644
--- a/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java
+++ b/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java
@@ -33,6 +33,8 @@ public class ProductSearchSettings extends SearchSettings
public RecommendationSettings recommendations;
public @Nullable SelectedBrandPropertiesSettings selectedBrandProperties;
public @Nullable VariantSearchSettings variantSettings;
+ /** Used to define constraints which must be honoured to be a valid results. The difference between this and Filters, is that filters are evaluated per product and variant, constraints could be acting on the result of such filter evaluations or a combination of factors, such as whether the product has any variants which matched the provided filters etc. */
+ public @Nullable ProductSearchResultConstraint resultConstraint;
public static ProductSearchSettings create()
{
return new ProductSearchSettings();
@@ -65,6 +67,11 @@ public RecommendationSettings getRecommendations()
{
return this.variantSettings;
}
+ /** Used to define constraints which must be honoured to be a valid results. The difference between this and Filters, is that filters are evaluated per product and variant, constraints could be acting on the result of such filter evaluations or a combination of factors, such as whether the product has any variants which matched the provided filters etc. */
+ public @Nullable ProductSearchResultConstraint getResultConstraint()
+ {
+ return this.resultConstraint;
+ }
public ProductSearchSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties)
{
this.selectedProductProperties = selectedProductProperties;
@@ -96,4 +103,10 @@ public ProductSearchSettings setVariantSettings(VariantSearchSettings variantSet
this.variantSettings = variantSettings;
return this;
}
+ /** Used to define constraints which must be honoured to be a valid results. The difference between this and Filters, is that filters are evaluated per product and variant, constraints could be acting on the result of such filter evaluations or a combination of factors, such as whether the product has any variants which matched the provided filters etc. */
+ public ProductSearchSettings setResultConstraint(ProductSearchResultConstraint resultConstraint)
+ {
+ this.resultConstraint = resultConstraint;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductView.java b/src/src/main/java/com/relewise/client/model/ProductView.java
index 27f98b41..23564428 100644
--- a/src/src/main/java/com/relewise/client/model/ProductView.java
+++ b/src/src/main/java/com/relewise/client/model/ProductView.java
@@ -29,6 +29,8 @@ public class ProductView extends Trackable implements IUserIdentifier
public @Nullable User user;
public Product product;
public @Nullable ProductVariant variant;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static ProductView create(@Nullable User user, Product product)
{
return new ProductView(user, product);
@@ -65,6 +67,11 @@ public Product getProduct()
{
return this.variant;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public ProductView setUser(User user)
{
this.user = user;
@@ -80,4 +87,10 @@ public ProductView setVariant(ProductVariant variant)
this.variant = variant;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public ProductView setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingContentRequest.java b/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingContentRequest.java
index 400f59b2..0fc7dd35 100644
--- a/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingContentRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingContentRequest.java
@@ -93,4 +93,11 @@ public ProductsViewedAfterViewingContentRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductsViewedAfterViewingContentRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingProductRequest.java b/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingProductRequest.java
index 486a72b8..74d4cf5f 100644
--- a/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingProductRequest.java
+++ b/src/src/main/java/com/relewise/client/model/ProductsViewedAfterViewingProductRequest.java
@@ -93,4 +93,11 @@ public ProductsViewedAfterViewingProductRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public ProductsViewedAfterViewingProductRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/Promotion.java b/src/src/main/java/com/relewise/client/model/Promotion.java
new file mode 100644
index 00000000..5feaf3e2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/Promotion.java
@@ -0,0 +1,51 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ProductPromotion.class, name = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class Promotion
+{
+ public String $type = "";
+ public String name;
+ public @Nullable PromotionLocationCollection locations;
+ public String getName()
+ {
+ return this.name;
+ }
+ public @Nullable PromotionLocationCollection getLocations()
+ {
+ return this.locations;
+ }
+ public Promotion setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ public Promotion setLocations(PromotionLocationCollection locations)
+ {
+ this.locations = locations;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionCollection.java b/src/src/main/java/com/relewise/client/model/PromotionCollection.java
new file mode 100644
index 00000000..fb5f9751
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionCollection.java
@@ -0,0 +1,53 @@
+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 PromotionCollection
+{
+ public ArrayList promotions;
+ public static PromotionCollection create(Promotion... promotions)
+ {
+ return new PromotionCollection(promotions);
+ }
+ public PromotionCollection(Promotion... promotions)
+ {
+ this.promotions = new ArrayList<>(Arrays.asList(promotions));
+ }
+ public PromotionCollection()
+ {
+ }
+ public ArrayList getPromotions()
+ {
+ return this.promotions;
+ }
+ public PromotionCollection setPromotions(Promotion... promotions)
+ {
+ this.promotions = new ArrayList<>(Arrays.asList(promotions));;
+ return this;
+ }
+ public PromotionCollection addToPromotions(Promotion promotions)
+ {
+ if (this.promotions == null)
+ {
+ this.promotions = new ArrayList<>();
+ }
+ this.promotions.add(promotions);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionLocation.java b/src/src/main/java/com/relewise/client/model/PromotionLocation.java
new file mode 100644
index 00000000..8003c3f4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionLocation.java
@@ -0,0 +1,65 @@
+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 PromotionLocation
+{
+ public String key;
+ public @Nullable PromotionLocationPlacementCollection placements;
+ public static PromotionLocation create(String key)
+ {
+ return new PromotionLocation(key);
+ }
+ public PromotionLocation(String key)
+ {
+ this.key = key;
+ this.placements = null;
+ }
+ public static PromotionLocation create(String key, PromotionLocationPlacementCollection placements)
+ {
+ return new PromotionLocation(key, placements);
+ }
+ public PromotionLocation(String key, PromotionLocationPlacementCollection placements)
+ {
+ this.key = key;
+ this.placements = placements;
+ }
+ public PromotionLocation()
+ {
+ this.placements = null;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public @Nullable PromotionLocationPlacementCollection getPlacements()
+ {
+ return this.placements;
+ }
+ public PromotionLocation setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ public PromotionLocation setPlacements(PromotionLocationPlacementCollection placements)
+ {
+ this.placements = placements;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionLocationCollection.java b/src/src/main/java/com/relewise/client/model/PromotionLocationCollection.java
new file mode 100644
index 00000000..8ce574e9
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionLocationCollection.java
@@ -0,0 +1,53 @@
+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 PromotionLocationCollection
+{
+ public ArrayList items;
+ public static PromotionLocationCollection create(PromotionLocation... placements)
+ {
+ return new PromotionLocationCollection(placements);
+ }
+ public PromotionLocationCollection(PromotionLocation... placements)
+ {
+ this.items = new ArrayList<>(Arrays.asList(placements));
+ }
+ public PromotionLocationCollection()
+ {
+ }
+ public ArrayList getItems()
+ {
+ return this.items;
+ }
+ public PromotionLocationCollection setItems(PromotionLocation... items)
+ {
+ this.items = new ArrayList<>(Arrays.asList(items));;
+ return this;
+ }
+ public PromotionLocationCollection addToItems(PromotionLocation items)
+ {
+ if (this.items == null)
+ {
+ this.items = new ArrayList<>();
+ }
+ this.items.add(items);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionLocationPlacement.java b/src/src/main/java/com/relewise/client/model/PromotionLocationPlacement.java
new file mode 100644
index 00000000..30f2879a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionLocationPlacement.java
@@ -0,0 +1,48 @@
+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;
+
+/** Represents a placement within a location in the system where promotions can be shown */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class PromotionLocationPlacement
+{
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public String key;
+ public static PromotionLocationPlacement create(String key)
+ {
+ return new PromotionLocationPlacement(key);
+ }
+ public PromotionLocationPlacement(String key)
+ {
+ this.key = key;
+ }
+ public PromotionLocationPlacement()
+ {
+ }
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public String getKey()
+ {
+ return this.key;
+ }
+ /** A key which is automatically computed based on the name. This value gets created the first time the placement is saved and cannot be modified in the future. Manually assigning a value to this will have no effect. */
+ public PromotionLocationPlacement setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionLocationPlacementCollection.java b/src/src/main/java/com/relewise/client/model/PromotionLocationPlacementCollection.java
new file mode 100644
index 00000000..3e989982
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionLocationPlacementCollection.java
@@ -0,0 +1,53 @@
+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 PromotionLocationPlacementCollection
+{
+ public ArrayList items;
+ public static PromotionLocationPlacementCollection create(PromotionLocationPlacement... placements)
+ {
+ return new PromotionLocationPlacementCollection(placements);
+ }
+ public PromotionLocationPlacementCollection(PromotionLocationPlacement... placements)
+ {
+ this.items = new ArrayList<>(Arrays.asList(placements));
+ }
+ public PromotionLocationPlacementCollection()
+ {
+ }
+ public ArrayList getItems()
+ {
+ return this.items;
+ }
+ public PromotionLocationPlacementCollection setItems(PromotionLocationPlacement... items)
+ {
+ this.items = new ArrayList<>(Arrays.asList(items));;
+ return this;
+ }
+ public PromotionLocationPlacementCollection addToItems(PromotionLocationPlacement items)
+ {
+ if (this.items == null)
+ {
+ this.items = new ArrayList<>();
+ }
+ this.items.add(items);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionSpecification.java b/src/src/main/java/com/relewise/client/model/PromotionSpecification.java
new file mode 100644
index 00000000..bef3b227
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionSpecification.java
@@ -0,0 +1,31 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ProductPromotionSpecification.class, name = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion+Specification, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class PromotionSpecification
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionSpecificationCollection.java b/src/src/main/java/com/relewise/client/model/PromotionSpecificationCollection.java
new file mode 100644
index 00000000..e0694f5e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionSpecificationCollection.java
@@ -0,0 +1,40 @@
+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 PromotionSpecificationCollection
+{
+ public @Nullable ProductPromotionSpecification productPromotion;
+ public static PromotionSpecificationCollection create()
+ {
+ return new PromotionSpecificationCollection();
+ }
+ public PromotionSpecificationCollection()
+ {
+ }
+ public @Nullable ProductPromotionSpecification getProductPromotion()
+ {
+ return this.productPromotion;
+ }
+ public PromotionSpecificationCollection setProductPromotion(ProductPromotionSpecification productPromotion)
+ {
+ this.productPromotion = productPromotion;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariation.java b/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariation.java
new file mode 100644
index 00000000..cf0d9a25
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariation.java
@@ -0,0 +1,31 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ProductPromotionSpecificationVariation.class, name = "Relewise.Client.DataTypes.RetailMedia.ProductPromotion+SpecificationVariation, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class PromotionSpecificationVariation
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariationCollection.java b/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariationCollection.java
new file mode 100644
index 00000000..38924595
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PromotionSpecificationVariationCollection.java
@@ -0,0 +1,40 @@
+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 PromotionSpecificationVariationCollection
+{
+ public @Nullable ProductPromotionSpecificationVariation productPromotion;
+ public static PromotionSpecificationVariationCollection create()
+ {
+ return new PromotionSpecificationVariationCollection();
+ }
+ public PromotionSpecificationVariationCollection()
+ {
+ }
+ public @Nullable ProductPromotionSpecificationVariation getProductPromotion()
+ {
+ return this.productPromotion;
+ }
+ public PromotionSpecificationVariationCollection setProductPromotion(ProductPromotionSpecificationVariation productPromotion)
+ {
+ this.productPromotion = productPromotion;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PurchasedByUserCompanyInfo.java b/src/src/main/java/com/relewise/client/model/PurchasedByUserCompanyInfo.java
new file mode 100644
index 00000000..2eb5d4f6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/PurchasedByUserCompanyInfo.java
@@ -0,0 +1,65 @@
+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 PurchasedByUserCompanyInfo
+{
+ public OffsetDateTime mostRecentPurchasedUtc;
+ public Long totalNumberOfTimesPurchased;
+ public PurchasedByUserCompanyInfo purchasedByParentCompany;
+ public static PurchasedByUserCompanyInfo create(OffsetDateTime mostRecentPurchasedUtc, Long totalNumberOfTimesPurchased)
+ {
+ return new PurchasedByUserCompanyInfo(mostRecentPurchasedUtc, totalNumberOfTimesPurchased);
+ }
+ public PurchasedByUserCompanyInfo(OffsetDateTime mostRecentPurchasedUtc, Long totalNumberOfTimesPurchased)
+ {
+ this.mostRecentPurchasedUtc = mostRecentPurchasedUtc;
+ this.totalNumberOfTimesPurchased = totalNumberOfTimesPurchased;
+ }
+ public PurchasedByUserCompanyInfo()
+ {
+ }
+ public OffsetDateTime getMostRecentPurchasedUtc()
+ {
+ return this.mostRecentPurchasedUtc;
+ }
+ public Long getTotalNumberOfTimesPurchased()
+ {
+ return this.totalNumberOfTimesPurchased;
+ }
+ public PurchasedByUserCompanyInfo getPurchasedByParentCompany()
+ {
+ return this.purchasedByParentCompany;
+ }
+ public PurchasedByUserCompanyInfo setMostRecentPurchasedUtc(OffsetDateTime mostRecentPurchasedUtc)
+ {
+ this.mostRecentPurchasedUtc = mostRecentPurchasedUtc;
+ return this;
+ }
+ public PurchasedByUserCompanyInfo setTotalNumberOfTimesPurchased(Long totalNumberOfTimesPurchased)
+ {
+ this.totalNumberOfTimesPurchased = totalNumberOfTimesPurchased;
+ return this;
+ }
+ public PurchasedByUserCompanyInfo setPurchasedByParentCompany(PurchasedByUserCompanyInfo purchasedByParentCompany)
+ {
+ this.purchasedByParentCompany = purchasedByParentCompany;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/PurchasedWithCurrentCartRequest.java b/src/src/main/java/com/relewise/client/model/PurchasedWithCurrentCartRequest.java
index bbbdd29f..60724e7e 100644
--- a/src/src/main/java/com/relewise/client/model/PurchasedWithCurrentCartRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PurchasedWithCurrentCartRequest.java
@@ -82,4 +82,11 @@ public PurchasedWithCurrentCartRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PurchasedWithCurrentCartRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PurchasedWithMultipleProductsRequest.java b/src/src/main/java/com/relewise/client/model/PurchasedWithMultipleProductsRequest.java
index 0dd2b738..632a7b7b 100644
--- a/src/src/main/java/com/relewise/client/model/PurchasedWithMultipleProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PurchasedWithMultipleProductsRequest.java
@@ -106,4 +106,11 @@ public PurchasedWithMultipleProductsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PurchasedWithMultipleProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/PurchasedWithProductRequest.java b/src/src/main/java/com/relewise/client/model/PurchasedWithProductRequest.java
index a1099595..0ced951e 100644
--- a/src/src/main/java/com/relewise/client/model/PurchasedWithProductRequest.java
+++ b/src/src/main/java/com/relewise/client/model/PurchasedWithProductRequest.java
@@ -93,4 +93,11 @@ public PurchasedWithProductRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public PurchasedWithProductRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/RecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/RecentlyViewedByUserRelevanceModifier.java
new file mode 100644
index 00000000..98c1061f
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RecentlyViewedByUserRelevanceModifier.java
@@ -0,0 +1,92 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class RecentlyViewedByUserRelevanceModifier extends RelevanceModifier
+{
+ public String $type = "";
+ /** The start of the time period in which an entity will be considered relevant to the user if viewed previously by them. */
+ public @Nullable OffsetDateTime sinceUtc;
+ /** The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc
). */
+ public Double ifPreviouslyViewedByUserMultiplyWeightBy;
+ /** The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc
). */
+ public Double ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ /** The minutes since in which an entity will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer sinceMinutesAgo;
+ /** The start of the time period in which an entity will be considered relevant to the user if viewed previously by them. */
+ public @Nullable OffsetDateTime getSinceUtc()
+ {
+ return this.sinceUtc;
+ }
+ /** The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc
). */
+ public Double getIfPreviouslyViewedByUserMultiplyWeightBy()
+ {
+ return this.ifPreviouslyViewedByUserMultiplyWeightBy;
+ }
+ /** The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc
). */
+ public Double getIfNotPreviouslyViewedByUserMultiplyWeightBy()
+ {
+ return this.ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ }
+ /** The minutes since in which an entity will be considered relevant to the user if viewed previously by them. */
+ public @Nullable Integer getSinceMinutesAgo()
+ {
+ return this.sinceMinutesAgo;
+ }
+ /** The start of the time period in which an entity will be considered relevant to the user if viewed previously by them. */
+ public RecentlyViewedByUserRelevanceModifier setSinceUtc(@Nullable OffsetDateTime sinceUtc)
+ {
+ this.sinceUtc = sinceUtc;
+ return this;
+ }
+ /** The weight that the entity will be multiplied with if it has been viewed in the past by the user (since SinceUtc
). */
+ public RecentlyViewedByUserRelevanceModifier setIfPreviouslyViewedByUserMultiplyWeightBy(Double ifPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifPreviouslyViewedByUserMultiplyWeightBy = ifPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ /** The weight that the entity will be multiplied with if it has not been viewed in the past by the user (since SinceUtc
). */
+ public RecentlyViewedByUserRelevanceModifier setIfNotPreviouslyViewedByUserMultiplyWeightBy(Double ifNotPreviouslyViewedByUserMultiplyWeightBy)
+ {
+ this.ifNotPreviouslyViewedByUserMultiplyWeightBy = ifNotPreviouslyViewedByUserMultiplyWeightBy;
+ return this;
+ }
+ /** The minutes since in which an entity will be considered relevant to the user if viewed previously by them. */
+ public RecentlyViewedByUserRelevanceModifier setSinceMinutesAgo(@Nullable Integer sinceMinutesAgo)
+ {
+ this.sinceMinutesAgo = sinceMinutesAgo;
+ return this;
+ }
+ @Override
+ public RecentlyViewedByUserRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RecentlyViewedProductsRequest.java b/src/src/main/java/com/relewise/client/model/RecentlyViewedProductsRequest.java
index ec8c176d..9f126d69 100644
--- a/src/src/main/java/com/relewise/client/model/RecentlyViewedProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/RecentlyViewedProductsRequest.java
@@ -82,4 +82,11 @@ public RecentlyViewedProductsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public RecentlyViewedProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/RecommendationRequest.java b/src/src/main/java/com/relewise/client/model/RecommendationRequest.java
index 4320199e..6b09883e 100644
--- a/src/src/main/java/com/relewise/client/model/RecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/RecommendationRequest.java
@@ -54,16 +54,18 @@ public abstract class RecommendationRequest extends LicensedRequest implements I
{
public String $type = "";
public @Nullable Language language;
- public User user;
+ public @Nullable User user;
public RelevanceModifierCollection relevanceModifiers;
public FilterCollection filters;
public String displayedAtLocationType;
public @Nullable Currency currency;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public @Nullable Language getLanguage()
{
return this.language;
}
- public User getUser()
+ public @Nullable User getUser()
{
return this.user;
}
@@ -83,6 +85,11 @@ public String getDisplayedAtLocationType()
{
return this.currency;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public RecommendationRequest setLanguage(Language language)
{
this.language = language;
@@ -113,4 +120,10 @@ public RecommendationRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public RecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/RedirectRule.java b/src/src/main/java/com/relewise/client/model/RedirectRule.java
index 149875bb..9bef029f 100644
--- a/src/src/main/java/com/relewise/client/model/RedirectRule.java
+++ b/src/src/main/java/com/relewise/client/model/RedirectRule.java
@@ -25,7 +25,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class RedirectRule extends SearchRule
{
- public String $type = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.RedirectRule, Relewise.Client";
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.RedirectRule, Relewise.Client";
public SearchTermCondition condition;
public @Nullable String destination;
public @Nullable HashMap data;
diff --git a/src/src/main/java/com/relewise/client/model/RedirectRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/RedirectRuleSaveSearchRulesRequest.java
index bb5b45ea..55142c79 100644
--- a/src/src/main/java/com/relewise/client/model/RedirectRuleSaveSearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/RedirectRuleSaveSearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class RedirectRuleSaveSearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/RedirectRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/RedirectRuleSearchRulesResponse.java
index 03b69ae0..e14dc6bb 100644
--- a/src/src/main/java/com/relewise/client/model/RedirectRuleSearchRulesResponse.java
+++ b/src/src/main/java/com/relewise/client/model/RedirectRuleSearchRulesResponse.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class RedirectRuleSearchRulesResponse extends TimedResponse
diff --git a/src/src/main/java/com/relewise/client/model/RedirectRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/RedirectRulesRequestSortBySearchRulesRequest.java
index 2650fe23..1e30e7e1 100644
--- a/src/src/main/java/com/relewise/client/model/RedirectRulesRequestSortBySearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/RedirectRulesRequestSortBySearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class RedirectRulesRequestSortBySearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/RelativeDateTimeCondition.java b/src/src/main/java/com/relewise/client/model/RelativeDateTimeCondition.java
new file mode 100644
index 00000000..7a689f9d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RelativeDateTimeCondition.java
@@ -0,0 +1,116 @@
+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 ValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = RelativeDateTimeCondition.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelativeDateTimeCondition extends ValueCondition
+{
+ public String $type = "Relewise.Client.Requests.Conditions.RelativeDateTimeCondition, Relewise.Client";
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public RelativeTimeComparison comparison;
+ /** Defines the time unit that the compared value is defined in. */
+ public TimeUnit unit;
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public Long currentTimeOffset;
+ public static RelativeDateTimeCondition create(RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ return new RelativeDateTimeCondition(comparison, unit);
+ }
+ public RelativeDateTimeCondition(RelativeTimeComparison comparison, TimeUnit unit)
+ {
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = 0L;
+ this.negated = false;
+ }
+ /**
+ * Creates a ValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public static RelativeDateTimeCondition create(RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ return new RelativeDateTimeCondition(comparison, unit, currentTimeOffset, negated);
+ }
+ /**
+ * Creates a ValueCondition
that can check if an object value interpreted as a timestamp is before or after the current time.
+ * @param comparison Defines whether the compared value should be before or after the current time for the condition to evaluate true.
+ * @param unit Defines the time unit that the compared value is defined in.
+ * @param currentTimeOffset Defines an offset that is added to the current time when making the specified Comparison. This is specified in the unit defined by the Unit property.
+ * @param negated Whether the condition should be negated / inverted
+ */
+ public RelativeDateTimeCondition(RelativeTimeComparison comparison, TimeUnit unit, Long currentTimeOffset, Boolean negated)
+ {
+ this.comparison = comparison;
+ this.unit = unit;
+ this.currentTimeOffset = currentTimeOffset;
+ this.negated = negated;
+ }
+ public RelativeDateTimeCondition()
+ {
+ this.currentTimeOffset = 0L;
+ this.negated = false;
+ }
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public RelativeTimeComparison getComparison()
+ {
+ return this.comparison;
+ }
+ /** Defines the time unit that the compared value is defined in. */
+ public TimeUnit getUnit()
+ {
+ return this.unit;
+ }
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public Long getCurrentTimeOffset()
+ {
+ return this.currentTimeOffset;
+ }
+ /** Defines whether the compared value should be before or after the current time for the condition to evaluate true. */
+ public RelativeDateTimeCondition setComparison(RelativeTimeComparison comparison)
+ {
+ this.comparison = comparison;
+ return this;
+ }
+ /** Defines the time unit that the compared value is defined in. */
+ public RelativeDateTimeCondition setUnit(TimeUnit unit)
+ {
+ this.unit = unit;
+ return this;
+ }
+ /** Defines an offset that is added to the current time when making the specified Comparison
. This is specified in the unit defined by the Unit
property. */
+ public RelativeDateTimeCondition setCurrentTimeOffset(Long currentTimeOffset)
+ {
+ this.currentTimeOffset = currentTimeOffset;
+ return this;
+ }
+ @Override
+ public RelativeDateTimeCondition setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RelativeTimeComparison.java b/src/src/main/java/com/relewise/client/model/RelativeTimeComparison.java
new file mode 100644
index 00000000..f1607ee6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RelativeTimeComparison.java
@@ -0,0 +1,32 @@
+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 enum RelativeTimeComparison
+{
+ Before {
+ public String toString() {
+ return "Before";
+ }
+ },
+ After {
+ public String toString() {
+ return "After";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/RelevanceModifier.java b/src/src/main/java/com/relewise/client/model/RelevanceModifier.java
index d4a4d8d6..8cea958d 100644
--- a/src/src/main/java/com/relewise/client/model/RelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/RelevanceModifier.java
@@ -38,16 +38,30 @@
@JsonSubTypes.Type(value = VariantListPriceRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.VariantListPriceRelevanceModifier, Relewise.Client"),
@JsonSubTypes.Type(value = VariantSalesPriceRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.VariantSalesPriceRelevanceModifier, Relewise.Client"),
@JsonSubTypes.Type(value = UserFavoriteProductRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.UserFavoriteProductRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = VariantIdRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.VariantIdRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyPurchasedByCompanyRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyPurchasedByCompanyRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByCompanyRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByCompanyRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyPurchasedByUserCompanyRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyPurchasedByUserCompanyRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductRecentlyViewedByUserCompanyRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductRecentlyViewedByUserCompanyRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryRecentlyViewedByUserRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryRecentlyViewedByUserRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentDataRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductCategoryDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ProductCategoryDataRelevanceModifier, Relewise.Client"),
+ @JsonSubTypes.Type(value = ContentCategoryDataRelevanceModifier.class, name = "Relewise.Client.Requests.RelevanceModifiers.ContentCategoryDataRelevanceModifier, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class RelevanceModifier
{
public String $type = "";
+ /** Filters which entities this relevance modifier can apply to. */
public FilterCollection filters;
+ /** Filters which entities this relevance modifier can apply to. */
public FilterCollection getFilters()
{
return this.filters;
}
+ /** Filters which entities this relevance modifier can apply to. */
public RelevanceModifier setFilters(FilterCollection filters)
{
this.filters = filters;
diff --git a/src/src/main/java/com/relewise/client/model/RelevanceModifierCollection.java b/src/src/main/java/com/relewise/client/model/RelevanceModifierCollection.java
index 84157b38..036044e6 100644
--- a/src/src/main/java/com/relewise/client/model/RelevanceModifierCollection.java
+++ b/src/src/main/java/com/relewise/client/model/RelevanceModifierCollection.java
@@ -17,14 +17,24 @@
import java.util.Set;
import java.util.HashSet;
+/** a collection that contains multiple RelevanceModifier
s in its inner list Items
. */
@JsonIgnoreProperties(ignoreUnknown = true)
public class RelevanceModifierCollection
{
+ /** The items that the collection holds. */
public @Nullable ArrayList items;
+ /**
+ * Creates a collection that contains multiple RelevanceModifier
s in its inner list Items
.
+ * @param relevanceModifiers The items that the collection holds.
+ */
public static RelevanceModifierCollection create(RelevanceModifier... relevanceModifiers)
{
return new RelevanceModifierCollection(relevanceModifiers);
}
+ /**
+ * Creates a collection that contains multiple RelevanceModifier
s in its inner list Items
.
+ * @param relevanceModifiers The items that the collection holds.
+ */
public RelevanceModifierCollection(RelevanceModifier... relevanceModifiers)
{
this.items = new ArrayList<>(Arrays.asList(relevanceModifiers));
@@ -32,15 +42,18 @@ public RelevanceModifierCollection(RelevanceModifier... relevanceModifiers)
public RelevanceModifierCollection()
{
}
+ /** The items that the collection holds. */
public @Nullable ArrayList getItems()
{
return this.items;
}
+ /** The items that the collection holds. */
public RelevanceModifierCollection setItems(RelevanceModifier... items)
{
this.items = new ArrayList<>(Arrays.asList(items));;
return this;
}
+ /** The items that the collection holds. */
public RelevanceModifierCollection addToItems(RelevanceModifier items)
{
if (this.items == null)
diff --git a/src/src/main/java/com/relewise/client/model/RequestContextFilter.java b/src/src/main/java/com/relewise/client/model/RequestContextFilter.java
index 971e9924..d9bce5ba 100644
--- a/src/src/main/java/com/relewise/client/model/RequestContextFilter.java
+++ b/src/src/main/java/com/relewise/client/model/RequestContextFilter.java
@@ -25,6 +25,7 @@ public class RequestContextFilter
public ArrayList locations;
public ArrayList languages;
public ArrayList currencies;
+ public RequestFilterCriteria filters;
public static RequestContextFilter create()
{
return new RequestContextFilter();
@@ -52,6 +53,10 @@ public ArrayList getCurrencies()
{
return this.currencies;
}
+ public RequestFilterCriteria getFilters()
+ {
+ return this.filters;
+ }
public RequestContextFilter setRecommendations(RecommendationTypeCollection recommendations)
{
this.recommendations = recommendations;
@@ -104,4 +109,9 @@ public RequestContextFilter addToCurrencies(Currency currencies)
this.currencies.add(currencies);
return this;
}
+ public RequestContextFilter setFilters(RequestFilterCriteria filters)
+ {
+ this.filters = filters;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/RequestFilterCriteria.java b/src/src/main/java/com/relewise/client/model/RequestFilterCriteria.java
new file mode 100644
index 00000000..e6b55327
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RequestFilterCriteria.java
@@ -0,0 +1,60 @@
+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 RequestFilterCriteria
+{
+ public FilterCollection includes;
+ public FilterCollection excludes;
+ public @Nullable IntegerRange count;
+ public static RequestFilterCriteria create()
+ {
+ return new RequestFilterCriteria();
+ }
+ public RequestFilterCriteria()
+ {
+ }
+ public FilterCollection getIncludes()
+ {
+ return this.includes;
+ }
+ public FilterCollection getExcludes()
+ {
+ return this.excludes;
+ }
+ public @Nullable IntegerRange getCount()
+ {
+ return this.count;
+ }
+ public RequestFilterCriteria setIncludes(FilterCollection includes)
+ {
+ this.includes = includes;
+ return this;
+ }
+ public RequestFilterCriteria setExcludes(FilterCollection excludes)
+ {
+ this.excludes = excludes;
+ return this;
+ }
+ public RequestFilterCriteria setCount(IntegerRange count)
+ {
+ this.count = count;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ResultMustHaveVariantConstraint.java b/src/src/main/java/com/relewise/client/model/ResultMustHaveVariantConstraint.java
new file mode 100644
index 00000000..7fb7af92
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ResultMustHaveVariantConstraint.java
@@ -0,0 +1,50 @@
+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;
+
+/** Used to instruct the search engine that results which does not have any variants, must not be returned. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = ResultMustHaveVariantConstraint.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ResultMustHaveVariantConstraint extends ProductSearchResultConstraint
+{
+ public String $type = "Relewise.Client.Requests.Search.Settings.ResultMustHaveVariantConstraint, Relewise.Client";
+ /** Used to instruct the search engine that products which does not have any variants, will be returned anyway. */
+ public Boolean exceptWhenProductHasNoVariants;
+ public static ResultMustHaveVariantConstraint create()
+ {
+ return new ResultMustHaveVariantConstraint();
+ }
+ public ResultMustHaveVariantConstraint()
+ {
+ }
+ /** Used to instruct the search engine that products which does not have any variants, will be returned anyway. */
+ public Boolean getExceptWhenProductHasNoVariants()
+ {
+ return this.exceptWhenProductHasNoVariants;
+ }
+ /** Used to instruct the search engine that products which does not have any variants, will be returned anyway. */
+ public ResultMustHaveVariantConstraint setExceptWhenProductHasNoVariants(Boolean exceptWhenProductHasNoVariants)
+ {
+ this.exceptWhenProductHasNoVariants = exceptWhenProductHasNoVariants;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaEntity.java b/src/src/main/java/com/relewise/client/model/RetailMediaEntity.java
new file mode 100644
index 00000000..ebb3d9ab
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaEntity.java
@@ -0,0 +1,40 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class RetailMediaEntity
+{
+ public String $type = "";
+ public @Nullable UUID id;
+ public @Nullable UUID getId()
+ {
+ return this.id;
+ }
+ public RetailMediaEntity setId(@Nullable UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaQuery.java b/src/src/main/java/com/relewise/client/model/RetailMediaQuery.java
new file mode 100644
index 00000000..2d304278
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaQuery.java
@@ -0,0 +1,47 @@
+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 RetailMediaQuery
+{
+ /** Defines the location (f.e. 'Home Page'), placements (f.e. 'main zone' and 'power action') for specific Variation
(f.e. 'desktop'). */
+ public RetailMediaQueryLocationSelector location;
+ public static RetailMediaQuery create(RetailMediaQueryLocationSelector location)
+ {
+ return new RetailMediaQuery(location);
+ }
+ public RetailMediaQuery(RetailMediaQueryLocationSelector location)
+ {
+ this.location = location;
+ }
+ public RetailMediaQuery()
+ {
+ }
+ /** Defines the location (f.e. 'Home Page'), placements (f.e. 'main zone' and 'power action') for specific Variation
(f.e. 'desktop'). */
+ public RetailMediaQueryLocationSelector getLocation()
+ {
+ return this.location;
+ }
+ /** Defines the location (f.e. 'Home Page'), placements (f.e. 'main zone' and 'power action') for specific Variation
(f.e. 'desktop'). */
+ public RetailMediaQuery setLocation(RetailMediaQueryLocationSelector location)
+ {
+ this.location = location;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaQueryLocationSelector.java b/src/src/main/java/com/relewise/client/model/RetailMediaQueryLocationSelector.java
new file mode 100644
index 00000000..192f946a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaQueryLocationSelector.java
@@ -0,0 +1,88 @@
+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;
+
+/** Defines the location (f.e. 'Home Page'), placements (f.e. 'main zone' and 'power action') for specific Variation
(f.e. 'desktop'). */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RetailMediaQueryLocationSelector
+{
+ public String key;
+ /** The variation to retrieve the retail media content for, e.g. "Desktop", "Mobile", "Tablet" etc. */
+ public RetailMediaQueryVariationSelector variation;
+ /** The placements on the specified location. */
+ public RetailMediaQueryPlacementSelector[] placements;
+ public static RetailMediaQueryLocationSelector create(String key, RetailMediaQueryVariationSelector variation, RetailMediaQueryPlacementSelector... placements)
+ {
+ return new RetailMediaQueryLocationSelector(key, variation, placements);
+ }
+ public RetailMediaQueryLocationSelector(String key, RetailMediaQueryVariationSelector variation, RetailMediaQueryPlacementSelector... placements)
+ {
+ this.key = key;
+ this.variation = variation;
+ this.placements = placements;
+ }
+ public RetailMediaQueryLocationSelector()
+ {
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ /** The variation to retrieve the retail media content for, e.g. "Desktop", "Mobile", "Tablet" etc. */
+ public RetailMediaQueryVariationSelector getVariation()
+ {
+ return this.variation;
+ }
+ /** The placements on the specified location. */
+ public RetailMediaQueryPlacementSelector[] getPlacements()
+ {
+ return this.placements;
+ }
+ public RetailMediaQueryLocationSelector setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ /** The variation to retrieve the retail media content for, e.g. "Desktop", "Mobile", "Tablet" etc. */
+ public RetailMediaQueryLocationSelector setVariation(RetailMediaQueryVariationSelector variation)
+ {
+ this.variation = variation;
+ return this;
+ }
+ /** The placements on the specified location. */
+ public RetailMediaQueryLocationSelector setPlacements(RetailMediaQueryPlacementSelector... placements)
+ {
+ this.placements = placements;
+ return this;
+ }
+ /** The placements on the specified location. */
+ public RetailMediaQueryLocationSelector addToPlacements(RetailMediaQueryPlacementSelector placement)
+ {
+ if (this.placements == null)
+ {
+ this.placements = new RetailMediaQueryPlacementSelector[] { placement };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.placements));
+ existingList.add(placement);
+ this.placements = existingList.toArray(new RetailMediaQueryPlacementSelector[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaQueryPlacementSelector.java b/src/src/main/java/com/relewise/client/model/RetailMediaQueryPlacementSelector.java
new file mode 100644
index 00000000..f9088a83
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaQueryPlacementSelector.java
@@ -0,0 +1,45 @@
+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;
+
+/** Defines a placement (f.e. 'main zone', or 'power action') to locate promotions for. */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RetailMediaQueryPlacementSelector
+{
+ public String key;
+ public static RetailMediaQueryPlacementSelector create(String key)
+ {
+ return new RetailMediaQueryPlacementSelector(key);
+ }
+ public RetailMediaQueryPlacementSelector(String key)
+ {
+ this.key = key;
+ }
+ public RetailMediaQueryPlacementSelector()
+ {
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public RetailMediaQueryPlacementSelector setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaQueryVariationSelector.java b/src/src/main/java/com/relewise/client/model/RetailMediaQueryVariationSelector.java
new file mode 100644
index 00000000..b5bbbcc4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaQueryVariationSelector.java
@@ -0,0 +1,45 @@
+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;
+
+/** The variation to retrieve the retail media content for, e.g. "Desktop", "Mobile", "Tablet" etc. */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RetailMediaQueryVariationSelector
+{
+ public String key;
+ public static RetailMediaQueryVariationSelector create(String key)
+ {
+ return new RetailMediaQueryVariationSelector(key);
+ }
+ public RetailMediaQueryVariationSelector(String key)
+ {
+ this.key = key;
+ }
+ public RetailMediaQueryVariationSelector()
+ {
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public RetailMediaQueryVariationSelector setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaResult.java b/src/src/main/java/com/relewise/client/model/RetailMediaResult.java
new file mode 100644
index 00000000..807deaec
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaResult.java
@@ -0,0 +1,49 @@
+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 RetailMediaResult
+{
+ public @Nullable HashMap placements;
+ public static RetailMediaResult create()
+ {
+ return new RetailMediaResult();
+ }
+ public RetailMediaResult()
+ {
+ }
+ public @Nullable HashMap getPlacements()
+ {
+ return this.placements;
+ }
+ public RetailMediaResult addToPlacements(String key, RetailMediaResultPlacement value)
+ {
+ if (this.placements == null)
+ {
+ this.placements = new HashMap<>();
+ }
+ this.placements.put(key, value);
+ return this;
+ }
+ public RetailMediaResult setPlacements(HashMap placements)
+ {
+ this.placements = placements;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacement.java b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacement.java
new file mode 100644
index 00000000..6d7dfe38
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacement.java
@@ -0,0 +1,54 @@
+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 RetailMediaResultPlacement
+{
+ public @Nullable RetailMediaResultPlacementResultEntity[] results;
+ public static RetailMediaResultPlacement create()
+ {
+ return new RetailMediaResultPlacement();
+ }
+ public RetailMediaResultPlacement()
+ {
+ }
+ public @Nullable RetailMediaResultPlacementResultEntity[] getResults()
+ {
+ return this.results;
+ }
+ public RetailMediaResultPlacement setResults(RetailMediaResultPlacementResultEntity... results)
+ {
+ this.results = results;
+ return this;
+ }
+ public RetailMediaResultPlacement addToResults(RetailMediaResultPlacementResultEntity result)
+ {
+ if (this.results == null)
+ {
+ this.results = new RetailMediaResultPlacementResultEntity[] { result };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.results));
+ existingList.add(result);
+ this.results = existingList.toArray(new RetailMediaResultPlacementResultEntity[0]);
+ }
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntity.java b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntity.java
new file mode 100644
index 00000000..12c3333e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntity.java
@@ -0,0 +1,40 @@
+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 RetailMediaResultPlacementResultEntity
+{
+ public @Nullable RetailMediaResultPlacementResultEntityProduct promotedProduct;
+ public static RetailMediaResultPlacementResultEntity create()
+ {
+ return new RetailMediaResultPlacementResultEntity();
+ }
+ public RetailMediaResultPlacementResultEntity()
+ {
+ }
+ public @Nullable RetailMediaResultPlacementResultEntityProduct getPromotedProduct()
+ {
+ return this.promotedProduct;
+ }
+ public RetailMediaResultPlacementResultEntity setPromotedProduct(RetailMediaResultPlacementResultEntityProduct promotedProduct)
+ {
+ this.promotedProduct = promotedProduct;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntityProduct.java b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntityProduct.java
new file mode 100644
index 00000000..8768bf4a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/RetailMediaResultPlacementResultEntityProduct.java
@@ -0,0 +1,40 @@
+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 RetailMediaResultPlacementResultEntityProduct
+{
+ public ProductResult result;
+ public static RetailMediaResultPlacementResultEntityProduct create()
+ {
+ return new RetailMediaResultPlacementResultEntityProduct();
+ }
+ public RetailMediaResultPlacementResultEntityProduct()
+ {
+ }
+ public ProductResult getResult()
+ {
+ return this.result;
+ }
+ public RetailMediaResultPlacementResultEntityProduct setResult(ProductResult result)
+ {
+ this.result = result;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveAdvertisersRequest.java b/src/src/main/java/com/relewise/client/model/SaveAdvertisersRequest.java
new file mode 100644
index 00000000..46ed60f3
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveAdvertisersRequest.java
@@ -0,0 +1,67 @@
+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 = SaveAdvertisersRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveAdvertisersRequest extends AdvertiserSaveEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.SaveAdvertisersRequest, Relewise.Client";
+ public static SaveAdvertisersRequest create(Advertiser[] advertisers, String modifiedBy)
+ {
+ return new SaveAdvertisersRequest(advertisers, modifiedBy);
+ }
+ public SaveAdvertisersRequest(Advertiser[] advertisers, String modifiedBy)
+ {
+ this.entities = advertisers;
+ this.modifiedBy = modifiedBy;
+ }
+ public SaveAdvertisersRequest()
+ {
+ }
+ @Override
+ public SaveAdvertisersRequest setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveAdvertisersRequest addToEntities(Advertiser entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Advertiser[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Advertiser[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveAdvertisersRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveAdvertisersResponse.java b/src/src/main/java/com/relewise/client/model/SaveAdvertisersResponse.java
new file mode 100644
index 00000000..ff85fdc5
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveAdvertisersResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SaveAdvertisersResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveAdvertisersResponse extends AdvertiserSaveEntitiesResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.SaveAdvertisersResponse, Relewise.Client";
+ public static SaveAdvertisersResponse create(Advertiser... advertisers)
+ {
+ return new SaveAdvertisersResponse(advertisers);
+ }
+ public SaveAdvertisersResponse(Advertiser... advertisers)
+ {
+ this.entities = advertisers;
+ }
+ public SaveAdvertisersResponse()
+ {
+ }
+ @Override
+ public SaveAdvertisersResponse setEntities(Advertiser... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveAdvertisersResponse addToEntities(Advertiser entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Advertiser[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Advertiser[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveAdvertisersResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveCampaignsRequest.java b/src/src/main/java/com/relewise/client/model/SaveCampaignsRequest.java
new file mode 100644
index 00000000..90b5c61a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveCampaignsRequest.java
@@ -0,0 +1,67 @@
+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 = SaveCampaignsRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveCampaignsRequest extends CampaignSaveEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.SaveCampaignsRequest, Relewise.Client";
+ public static SaveCampaignsRequest create(Campaign[] campaigns, String modifiedBy)
+ {
+ return new SaveCampaignsRequest(campaigns, modifiedBy);
+ }
+ public SaveCampaignsRequest(Campaign[] campaigns, String modifiedBy)
+ {
+ this.entities = campaigns;
+ this.modifiedBy = modifiedBy;
+ }
+ public SaveCampaignsRequest()
+ {
+ }
+ @Override
+ public SaveCampaignsRequest setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveCampaignsRequest addToEntities(Campaign entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Campaign[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Campaign[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveCampaignsRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveCampaignsResponse.java b/src/src/main/java/com/relewise/client/model/SaveCampaignsResponse.java
new file mode 100644
index 00000000..75f17de2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveCampaignsResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SaveCampaignsResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveCampaignsResponse extends CampaignSaveEntitiesResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.SaveCampaignsResponse, Relewise.Client";
+ public static SaveCampaignsResponse create(Campaign... campaigns)
+ {
+ return new SaveCampaignsResponse(campaigns);
+ }
+ public SaveCampaignsResponse(Campaign... campaigns)
+ {
+ this.entities = campaigns;
+ }
+ public SaveCampaignsResponse()
+ {
+ }
+ @Override
+ public SaveCampaignsResponse setEntities(Campaign... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveCampaignsResponse addToEntities(Campaign entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Campaign[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Campaign[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveCampaignsResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveLocationsRequest.java b/src/src/main/java/com/relewise/client/model/SaveLocationsRequest.java
new file mode 100644
index 00000000..4226cddf
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveLocationsRequest.java
@@ -0,0 +1,67 @@
+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 = SaveLocationsRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveLocationsRequest extends LocationSaveEntitiesRequest
+{
+ public String $type = "Relewise.Client.Requests.RetailMedia.SaveLocationsRequest, Relewise.Client";
+ public static SaveLocationsRequest create(Location[] locations, String modifiedBy)
+ {
+ return new SaveLocationsRequest(locations, modifiedBy);
+ }
+ public SaveLocationsRequest(Location[] locations, String modifiedBy)
+ {
+ this.entities = locations;
+ this.modifiedBy = modifiedBy;
+ }
+ public SaveLocationsRequest()
+ {
+ }
+ @Override
+ public SaveLocationsRequest setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveLocationsRequest addToEntities(Location entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Location[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Location[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveLocationsRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveLocationsResponse.java b/src/src/main/java/com/relewise/client/model/SaveLocationsResponse.java
new file mode 100644
index 00000000..db76e3a7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveLocationsResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SaveLocationsResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveLocationsResponse extends LocationSaveEntitiesResponse
+{
+ public String $type = "Relewise.Client.Responses.RetailMedia.SaveLocationsResponse, Relewise.Client";
+ public static SaveLocationsResponse create(Location... locations)
+ {
+ return new SaveLocationsResponse(locations);
+ }
+ public SaveLocationsResponse(Location... locations)
+ {
+ this.entities = locations;
+ }
+ public SaveLocationsResponse()
+ {
+ }
+ @Override
+ public SaveLocationsResponse setEntities(Location... entities)
+ {
+ this.entities = entities;
+ return this;
+ }
+ public SaveLocationsResponse addToEntities(Location entity)
+ {
+ if (this.entities == null)
+ {
+ this.entities = new Location[] { entity };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entities));
+ existingList.add(entity);
+ this.entities = existingList.toArray(new Location[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveLocationsResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesRequest.java
new file mode 100644
index 00000000..5f2350de
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = SaveSearchResultModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveSearchResultModifierRulesRequest extends SearchResultModifierRuleSaveSearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.SaveSearchResultModifierRulesRequest, Relewise.Client";
+ public static SaveSearchResultModifierRulesRequest create(SearchResultModifierRule[] rules, String modifiedBy)
+ {
+ return new SaveSearchResultModifierRulesRequest(rules, modifiedBy);
+ }
+ public SaveSearchResultModifierRulesRequest(SearchResultModifierRule[] rules, String modifiedBy)
+ {
+ this.rules = rules;
+ this.modifiedBy = modifiedBy;
+ }
+ public SaveSearchResultModifierRulesRequest()
+ {
+ }
+ @Override
+ public SaveSearchResultModifierRulesRequest setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SaveSearchResultModifierRulesRequest addToRules(SearchResultModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchResultModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchResultModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveSearchResultModifierRulesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesResponse.java b/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesResponse.java
new file mode 100644
index 00000000..4aa8c6a6
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveSearchResultModifierRulesResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SaveSearchResultModifierRulesResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveSearchResultModifierRulesResponse extends SearchResultModifierRuleSaveSearchRulesResponse
+{
+ public String $type = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client";
+ public static SaveSearchResultModifierRulesResponse create(SearchResultModifierRule... rules)
+ {
+ return new SaveSearchResultModifierRulesResponse(rules);
+ }
+ public SaveSearchResultModifierRulesResponse(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ }
+ public SaveSearchResultModifierRulesResponse()
+ {
+ }
+ @Override
+ public SaveSearchResultModifierRulesResponse setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SaveSearchResultModifierRulesResponse addToRules(SearchResultModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchResultModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchResultModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveSearchResultModifierRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesRequest.java
new file mode 100644
index 00000000..52f6ec62
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = SaveSearchTermModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveSearchTermModifierRulesRequest extends SearchTermModifierRuleSaveSearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.SaveSearchTermModifierRulesRequest, Relewise.Client";
+ public static SaveSearchTermModifierRulesRequest create(SearchTermModifierRule[] rules, String modifiedBy)
+ {
+ return new SaveSearchTermModifierRulesRequest(rules, modifiedBy);
+ }
+ public SaveSearchTermModifierRulesRequest(SearchTermModifierRule[] rules, String modifiedBy)
+ {
+ this.rules = rules;
+ this.modifiedBy = modifiedBy;
+ }
+ public SaveSearchTermModifierRulesRequest()
+ {
+ }
+ @Override
+ public SaveSearchTermModifierRulesRequest setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SaveSearchTermModifierRulesRequest addToRules(SearchTermModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchTermModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchTermModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveSearchTermModifierRulesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesResponse.java b/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesResponse.java
new file mode 100644
index 00000000..e641b53b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SaveSearchTermModifierRulesResponse.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SaveSearchTermModifierRulesResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SaveSearchTermModifierRulesResponse extends SearchTermModifierRuleSaveSearchRulesResponse
+{
+ public String $type = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client";
+ public static SaveSearchTermModifierRulesResponse create(SearchTermModifierRule... rules)
+ {
+ return new SaveSearchTermModifierRulesResponse(rules);
+ }
+ public SaveSearchTermModifierRulesResponse(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ }
+ public SaveSearchTermModifierRulesResponse()
+ {
+ }
+ @Override
+ public SaveSearchTermModifierRulesResponse setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SaveSearchTermModifierRulesResponse addToRules(SearchTermModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchTermModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchTermModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SaveSearchTermModifierRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/ScheduledPeriod.java b/src/src/main/java/com/relewise/client/model/ScheduledPeriod.java
new file mode 100644
index 00000000..a5cf34ff
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ScheduledPeriod.java
@@ -0,0 +1,61 @@
+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 = ScheduledPeriod.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ScheduledPeriod implements ISchedule
+{
+ public String $type = "Relewise.Client.DataTypes.RetailMedia.ScheduledPeriod, Relewise.Client";
+ public @Nullable OffsetDateTime fromUtc;
+ public @Nullable OffsetDateTime toUtc;
+ public static ScheduledPeriod create(@Nullable OffsetDateTime fromUtc, @Nullable OffsetDateTime toUtc)
+ {
+ return new ScheduledPeriod(fromUtc, toUtc);
+ }
+ public ScheduledPeriod(@Nullable OffsetDateTime fromUtc, @Nullable OffsetDateTime toUtc)
+ {
+ this.fromUtc = fromUtc;
+ this.toUtc = toUtc;
+ }
+ public ScheduledPeriod()
+ {
+ }
+ public @Nullable OffsetDateTime getFromUtc()
+ {
+ return this.fromUtc;
+ }
+ public @Nullable OffsetDateTime getToUtc()
+ {
+ return this.toUtc;
+ }
+ public ScheduledPeriod setFromUtc(@Nullable OffsetDateTime fromUtc)
+ {
+ this.fromUtc = fromUtc;
+ return this;
+ }
+ public ScheduledPeriod setToUtc(@Nullable OffsetDateTime toUtc)
+ {
+ this.toUtc = toUtc;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchRequest.java b/src/src/main/java/com/relewise/client/model/SearchRequest.java
index f93db38f..6f7ae402 100644
--- a/src/src/main/java/com/relewise/client/model/SearchRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SearchRequest.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** The search request shape establishes language-currency context with search filters, optional user info. Defines Language
. Currency
pair, as well as Filters
(both PostFilters
). Products search is done through - ProductSearchRequest
Content search is done through - ContentSearchRequest
Search term prediction is done through - SearchTermPredictionRequest
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -41,6 +42,8 @@ public abstract class SearchRequest extends LicensedRequest implements IUserIden
public @Nullable FilterCollection filters;
public @Nullable SearchIndexSelector indexSelector;
public @Nullable FilterCollection postFilters;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public @Nullable Language getLanguage()
{
return this.language;
@@ -73,6 +76,11 @@ public abstract class SearchRequest extends LicensedRequest implements IUserIden
{
return this.postFilters;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public SearchRequest setLanguage(Language language)
{
this.language = language;
@@ -113,4 +121,10 @@ public SearchRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public SearchRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SearchRequestCollection.java b/src/src/main/java/com/relewise/client/model/SearchRequestCollection.java
index 7a461d57..43a35821 100644
--- a/src/src/main/java/com/relewise/client/model/SearchRequestCollection.java
+++ b/src/src/main/java/com/relewise/client/model/SearchRequestCollection.java
@@ -117,4 +117,11 @@ public SearchRequestCollection setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SearchRequestCollection setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRule.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRule.java
new file mode 100644
index 00000000..2ad5b4c2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRule.java
@@ -0,0 +1,139 @@
+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 = SearchResultModifierRule.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchResultModifierRule extends SearchRule
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule, Relewise.Client";
+ public SearchTermCondition condition;
+ public SearchResultModifierRuleRuleAction[] actions;
+ public static SearchResultModifierRule create(UUID id, @Nullable ApplicableIndexes indexes, @Nullable ApplicableLanguages languages, Boolean isApproved, SearchTermCondition condition, SearchResultModifierRuleRuleAction... actions)
+ {
+ return new SearchResultModifierRule(id, indexes, languages, isApproved, condition, actions);
+ }
+ public SearchResultModifierRule(UUID id, @Nullable ApplicableIndexes indexes, @Nullable ApplicableLanguages languages, Boolean isApproved, SearchTermCondition condition, SearchResultModifierRuleRuleAction... actions)
+ {
+ this.id = id;
+ this.indexes = indexes;
+ this.languages = languages;
+ this.isApproved = isApproved;
+ this.condition = condition;
+ this.actions = actions;
+ }
+ public SearchResultModifierRule()
+ {
+ }
+ public SearchTermCondition getCondition()
+ {
+ return this.condition;
+ }
+ public SearchResultModifierRuleRuleAction[] getActions()
+ {
+ return this.actions;
+ }
+ public SearchResultModifierRule setCondition(SearchTermCondition condition)
+ {
+ this.condition = condition;
+ return this;
+ }
+ public SearchResultModifierRule setActions(SearchResultModifierRuleRuleAction... actions)
+ {
+ this.actions = actions;
+ return this;
+ }
+ public SearchResultModifierRule addToActions(SearchResultModifierRuleRuleAction action)
+ {
+ if (this.actions == null)
+ {
+ this.actions = new SearchResultModifierRuleRuleAction[] { action };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.actions));
+ existingList.add(action);
+ this.actions = existingList.toArray(new SearchResultModifierRuleRuleAction[0]);
+ }
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setIndexes(ApplicableIndexes indexes)
+ {
+ this.indexes = indexes;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setLanguages(ApplicableLanguages languages)
+ {
+ this.languages = languages;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setApproved(@Nullable OffsetDateTime approved)
+ {
+ this.approved = approved;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setApprovedBy(String approvedBy)
+ {
+ this.approvedBy = approvedBy;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRule setIsApproved(Boolean isApproved)
+ {
+ this.isApproved = isApproved;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddFiltersAction.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddFiltersAction.java
new file mode 100644
index 00000000..b6947138
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddFiltersAction.java
@@ -0,0 +1,50 @@
+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 = SearchResultModifierRuleAddFiltersAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchResultModifierRuleAddFiltersAction extends SearchResultModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule+AddFiltersAction, Relewise.Client";
+ public FilterCollection filters;
+ public static SearchResultModifierRuleAddFiltersAction create(FilterCollection filters)
+ {
+ return new SearchResultModifierRuleAddFiltersAction(filters);
+ }
+ public SearchResultModifierRuleAddFiltersAction(FilterCollection filters)
+ {
+ this.filters = filters;
+ }
+ public SearchResultModifierRuleAddFiltersAction()
+ {
+ }
+ public FilterCollection getFilters()
+ {
+ return this.filters;
+ }
+ public SearchResultModifierRuleAddFiltersAction setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddTermFilterAction.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddTermFilterAction.java
new file mode 100644
index 00000000..0ee266c2
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleAddTermFilterAction.java
@@ -0,0 +1,61 @@
+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 = SearchResultModifierRuleAddTermFilterAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchResultModifierRuleAddTermFilterAction extends SearchResultModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule+AddTermFilterAction, Relewise.Client";
+ public String term;
+ public Boolean negated;
+ public static SearchResultModifierRuleAddTermFilterAction create(String term, Boolean negated)
+ {
+ return new SearchResultModifierRuleAddTermFilterAction(term, negated);
+ }
+ public SearchResultModifierRuleAddTermFilterAction(String term, Boolean negated)
+ {
+ this.term = term;
+ this.negated = negated;
+ }
+ public SearchResultModifierRuleAddTermFilterAction()
+ {
+ }
+ public String getTerm()
+ {
+ return this.term;
+ }
+ public Boolean getNegated()
+ {
+ return this.negated;
+ }
+ public SearchResultModifierRuleAddTermFilterAction setTerm(String term)
+ {
+ this.term = term;
+ return this;
+ }
+ public SearchResultModifierRuleAddTermFilterAction setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleRuleAction.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleRuleAction.java
new file mode 100644
index 00000000..f561d5c7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleRuleAction.java
@@ -0,0 +1,32 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SearchResultModifierRuleAddFiltersAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule+AddFiltersAction, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRuleAddTermFilterAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule+AddTermFilterAction, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchResultModifierRuleRuleAction
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesRequest.java
new file mode 100644
index 00000000..c4a56706
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesRequest.java
@@ -0,0 +1,56 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SavePredictionRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SavePredictionRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchResultModifierRuleSaveSearchRulesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public SearchResultModifierRule[] rules;
+ public String modifiedBy;
+ public SearchResultModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public SearchResultModifierRuleSaveSearchRulesRequest setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchResultModifierRuleSaveSearchRulesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesResponse.java
new file mode 100644
index 00000000..300e2124
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSaveSearchRulesResponse.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SavePredictionRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SavePredictionRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveRedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveRedirectRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveDecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveDecompoundRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveStemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveStemmingRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchResultModifierRuleSaveSearchRulesResponse extends TimedResponse
+{
+ public String $type = "";
+ public SearchResultModifierRule[] rules;
+ public SearchResultModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public SearchResultModifierRuleSaveSearchRulesResponse setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRuleSaveSearchRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSearchRulesResponse.java
new file mode 100644
index 00000000..fab755cd
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRuleSearchRulesResponse.java
@@ -0,0 +1,62 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = PredictionRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.PredictionRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchResultModifierRuleSearchRulesResponse extends TimedResponse
+{
+ public String $type = "";
+ public SearchResultModifierRule[] rules;
+ public Integer hits;
+ public SearchResultModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public SearchResultModifierRuleSearchRulesResponse setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchResultModifierRuleSearchRulesResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRuleSearchRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequest.java
new file mode 100644
index 00000000..dd394404
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = SearchResultModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchResultModifierRulesRequest extends SearchResultModifierRulesRequestSortBySearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client";
+ public static SearchResultModifierRulesRequest create(SearchRuleFilters filters, SearchResultModifierRulesRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ return new SearchResultModifierRulesRequest(filters, sorting, skip, take);
+ }
+ public SearchResultModifierRulesRequest(SearchRuleFilters filters, SearchResultModifierRulesRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ this.filters = filters;
+ this.sorting = sorting;
+ this.skip = skip;
+ this.take = take;
+ }
+ public SearchResultModifierRulesRequest()
+ {
+ }
+ @Override
+ public SearchResultModifierRulesRequest setFilters(SearchRuleFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRulesRequest setSorting(SearchResultModifierRulesRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRulesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRulesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBy.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBy.java
new file mode 100644
index 00000000..0d8a2f9a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBy.java
@@ -0,0 +1,32 @@
+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 enum SearchResultModifierRulesRequestSortBy
+{
+ Created {
+ public String toString() {
+ return "Created";
+ }
+ },
+ Modified {
+ public String toString() {
+ return "Modified";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySearchRulesRequest.java
new file mode 100644
index 00000000..c936fddf
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySearchRulesRequest.java
@@ -0,0 +1,76 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = PredictionRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.PredictionRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchResultModifierRulesRequestSortBySearchRulesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public SearchRuleFilters filters;
+ public SearchResultModifierRulesRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public SearchRuleFilters getFilters()
+ {
+ return this.filters;
+ }
+ public SearchResultModifierRulesRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public SearchResultModifierRulesRequestSortBySearchRulesRequest setFilters(SearchRuleFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public SearchResultModifierRulesRequestSortBySearchRulesRequest setSorting(SearchResultModifierRulesRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public SearchResultModifierRulesRequestSortBySearchRulesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public SearchResultModifierRulesRequestSortBySearchRulesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySorting.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySorting.java
new file mode 100644
index 00000000..c8ee8cf9
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesRequestSortBySorting.java
@@ -0,0 +1,55 @@
+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 SearchResultModifierRulesRequestSortBySorting
+{
+ public SearchResultModifierRulesRequestSortBy sortBy;
+ public SortOrder sortOrder;
+ public static SearchResultModifierRulesRequestSortBySorting create(SearchResultModifierRulesRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ return new SearchResultModifierRulesRequestSortBySorting(sortBy, sortOrder);
+ }
+ public SearchResultModifierRulesRequestSortBySorting(SearchResultModifierRulesRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ this.sortBy = sortBy;
+ this.sortOrder = sortOrder;
+ }
+ public SearchResultModifierRulesRequestSortBySorting()
+ {
+ }
+ public SearchResultModifierRulesRequestSortBy getSortBy()
+ {
+ return this.sortBy;
+ }
+ public SortOrder getSortOrder()
+ {
+ return this.sortOrder;
+ }
+ public SearchResultModifierRulesRequestSortBySorting setSortBy(SearchResultModifierRulesRequestSortBy sortBy)
+ {
+ this.sortBy = sortBy;
+ return this;
+ }
+ public SearchResultModifierRulesRequestSortBySorting setSortOrder(SortOrder sortOrder)
+ {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesResponse.java
new file mode 100644
index 00000000..6e063692
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchResultModifierRulesResponse.java
@@ -0,0 +1,73 @@
+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 = SearchResultModifierRulesResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchResultModifierRulesResponse extends SearchResultModifierRuleSearchRulesResponse
+{
+ public String $type = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client";
+ public static SearchResultModifierRulesResponse create(SearchResultModifierRule[] rules, Integer hits)
+ {
+ return new SearchResultModifierRulesResponse(rules, hits);
+ }
+ public SearchResultModifierRulesResponse(SearchResultModifierRule[] rules, Integer hits)
+ {
+ this.rules = rules;
+ this.hits = hits;
+ }
+ public SearchResultModifierRulesResponse()
+ {
+ }
+ @Override
+ public SearchResultModifierRulesResponse setRules(SearchResultModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchResultModifierRulesResponse addToRules(SearchResultModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchResultModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchResultModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SearchResultModifierRulesResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ @Override
+ public SearchResultModifierRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchRule.java b/src/src/main/java/com/relewise/client/model/SearchRule.java
index 2bf2ce0b..afe18f4b 100644
--- a/src/src/main/java/com/relewise/client/model/SearchRule.java
+++ b/src/src/main/java/com/relewise/client/model/SearchRule.java
@@ -22,10 +22,12 @@
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "$type")
@JsonSubTypes({
- @JsonSubTypes.Type(value = PredictionRule.class, name = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.PredictionRule, Relewise.Client"),
- @JsonSubTypes.Type(value = RedirectRule.class, name = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.RedirectRule, Relewise.Client"),
- @JsonSubTypes.Type(value = DecompoundRule.class, name = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.DecompoundRule, Relewise.Client"),
- @JsonSubTypes.Type(value = StemmingRule.class, name = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.StemmingRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = PredictionRule.class, name = "Relewise.Client.DataTypes.Search.Rules.PredictionRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = RedirectRule.class, name = "Relewise.Client.DataTypes.Search.Rules.RedirectRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = DecompoundRule.class, name = "Relewise.Client.DataTypes.Search.Rules.DecompoundRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = StemmingRule.class, name = "Relewise.Client.DataTypes.Search.Rules.StemmingRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRule.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRule.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchResultModifierRule, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class SearchRule
diff --git a/src/src/main/java/com/relewise/client/model/SearchTerm.java b/src/src/main/java/com/relewise/client/model/SearchTerm.java
index 4c3e020f..4adfde7b 100644
--- a/src/src/main/java/com/relewise/client/model/SearchTerm.java
+++ b/src/src/main/java/com/relewise/client/model/SearchTerm.java
@@ -29,6 +29,8 @@ public class SearchTerm extends Trackable implements IUserIdentifier
public Language language;
public User user;
public String term;
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel channel;
public static SearchTerm create(Language language, User user, String term)
{
return new SearchTerm(language, user, term);
@@ -54,6 +56,11 @@ public String getTerm()
{
return this.term;
}
+ /** @deprecated Use User.Channel instead. */
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
public SearchTerm setLanguage(Language language)
{
this.language = language;
@@ -69,4 +76,10 @@ public SearchTerm setTerm(String term)
this.term = term;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ public SearchTerm setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermBasedProductRecommendationRequest.java b/src/src/main/java/com/relewise/client/model/SearchTermBasedProductRecommendationRequest.java
index 64e2e1ab..ccd3aa4d 100644
--- a/src/src/main/java/com/relewise/client/model/SearchTermBasedProductRecommendationRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SearchTermBasedProductRecommendationRequest.java
@@ -93,4 +93,11 @@ public SearchTermBasedProductRecommendationRequest setCurrency(Currency currency
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SearchTermBasedProductRecommendationRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRule.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRule.java
new file mode 100644
index 00000000..414d475a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRule.java
@@ -0,0 +1,139 @@
+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 = SearchTermModifierRule.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRule extends SearchRule
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule, Relewise.Client";
+ public SearchTermCondition condition;
+ public SearchTermModifierRuleRuleAction[] actions;
+ public static SearchTermModifierRule create(UUID id, @Nullable ApplicableIndexes indexes, @Nullable ApplicableLanguages languages, Boolean isApproved, SearchTermCondition condition, SearchTermModifierRuleRuleAction... actions)
+ {
+ return new SearchTermModifierRule(id, indexes, languages, isApproved, condition, actions);
+ }
+ public SearchTermModifierRule(UUID id, @Nullable ApplicableIndexes indexes, @Nullable ApplicableLanguages languages, Boolean isApproved, SearchTermCondition condition, SearchTermModifierRuleRuleAction... actions)
+ {
+ this.id = id;
+ this.indexes = indexes;
+ this.languages = languages;
+ this.isApproved = isApproved;
+ this.condition = condition;
+ this.actions = actions;
+ }
+ public SearchTermModifierRule()
+ {
+ }
+ public SearchTermCondition getCondition()
+ {
+ return this.condition;
+ }
+ public SearchTermModifierRuleRuleAction[] getActions()
+ {
+ return this.actions;
+ }
+ public SearchTermModifierRule setCondition(SearchTermCondition condition)
+ {
+ this.condition = condition;
+ return this;
+ }
+ public SearchTermModifierRule setActions(SearchTermModifierRuleRuleAction... actions)
+ {
+ this.actions = actions;
+ return this;
+ }
+ public SearchTermModifierRule addToActions(SearchTermModifierRuleRuleAction action)
+ {
+ if (this.actions == null)
+ {
+ this.actions = new SearchTermModifierRuleRuleAction[] { action };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.actions));
+ existingList.add(action);
+ this.actions = existingList.toArray(new SearchTermModifierRuleRuleAction[0]);
+ }
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setIndexes(ApplicableIndexes indexes)
+ {
+ this.indexes = indexes;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setLanguages(ApplicableLanguages languages)
+ {
+ this.languages = languages;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setApproved(@Nullable OffsetDateTime approved)
+ {
+ this.approved = approved;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setApprovedBy(String approvedBy)
+ {
+ this.approvedBy = approvedBy;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRule setIsApproved(Boolean isApproved)
+ {
+ this.isApproved = isApproved;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleAppendToTermAction.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleAppendToTermAction.java
new file mode 100644
index 00000000..8fbe20d9
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleAppendToTermAction.java
@@ -0,0 +1,50 @@
+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 = SearchTermModifierRuleAppendToTermAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRuleAppendToTermAction extends SearchTermModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+AppendToTermAction, Relewise.Client";
+ public String words;
+ public static SearchTermModifierRuleAppendToTermAction create(String words)
+ {
+ return new SearchTermModifierRuleAppendToTermAction(words);
+ }
+ public SearchTermModifierRuleAppendToTermAction(String words)
+ {
+ this.words = words;
+ }
+ public SearchTermModifierRuleAppendToTermAction()
+ {
+ }
+ public String getWords()
+ {
+ return this.words;
+ }
+ public SearchTermModifierRuleAppendToTermAction setWords(String words)
+ {
+ this.words = words;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRemoveFromTermAction.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRemoveFromTermAction.java
new file mode 100644
index 00000000..98496a82
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRemoveFromTermAction.java
@@ -0,0 +1,50 @@
+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 = SearchTermModifierRuleRemoveFromTermAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRuleRemoveFromTermAction extends SearchTermModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+RemoveFromTermAction, Relewise.Client";
+ public String words;
+ public static SearchTermModifierRuleRemoveFromTermAction create(String words)
+ {
+ return new SearchTermModifierRuleRemoveFromTermAction(words);
+ }
+ public SearchTermModifierRuleRemoveFromTermAction(String words)
+ {
+ this.words = words;
+ }
+ public SearchTermModifierRuleRemoveFromTermAction()
+ {
+ }
+ public String getWords()
+ {
+ return this.words;
+ }
+ public SearchTermModifierRuleRemoveFromTermAction setWords(String words)
+ {
+ this.words = words;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceTermAction.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceTermAction.java
new file mode 100644
index 00000000..2c91a777
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceTermAction.java
@@ -0,0 +1,50 @@
+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 = SearchTermModifierRuleReplaceTermAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRuleReplaceTermAction extends SearchTermModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+ReplaceTermAction, Relewise.Client";
+ public @Nullable String replacement;
+ public static SearchTermModifierRuleReplaceTermAction create(String replacement)
+ {
+ return new SearchTermModifierRuleReplaceTermAction(replacement);
+ }
+ public SearchTermModifierRuleReplaceTermAction(String replacement)
+ {
+ this.replacement = replacement;
+ }
+ public SearchTermModifierRuleReplaceTermAction()
+ {
+ }
+ public @Nullable String getReplacement()
+ {
+ return this.replacement;
+ }
+ public SearchTermModifierRuleReplaceTermAction setReplacement(String replacement)
+ {
+ this.replacement = replacement;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceWordsInTermAction.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceWordsInTermAction.java
new file mode 100644
index 00000000..c46b6e73
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleReplaceWordsInTermAction.java
@@ -0,0 +1,61 @@
+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 = SearchTermModifierRuleReplaceWordsInTermAction.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRuleReplaceWordsInTermAction extends SearchTermModifierRuleRuleAction
+{
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+ReplaceWordsInTermAction, Relewise.Client";
+ public String words;
+ public @Nullable String replacement;
+ public static SearchTermModifierRuleReplaceWordsInTermAction create(String words, String replacement)
+ {
+ return new SearchTermModifierRuleReplaceWordsInTermAction(words, replacement);
+ }
+ public SearchTermModifierRuleReplaceWordsInTermAction(String words, String replacement)
+ {
+ this.words = words;
+ this.replacement = replacement;
+ }
+ public SearchTermModifierRuleReplaceWordsInTermAction()
+ {
+ }
+ public String getWords()
+ {
+ return this.words;
+ }
+ public @Nullable String getReplacement()
+ {
+ return this.replacement;
+ }
+ public SearchTermModifierRuleReplaceWordsInTermAction setWords(String words)
+ {
+ this.words = words;
+ return this;
+ }
+ public SearchTermModifierRuleReplaceWordsInTermAction setReplacement(String replacement)
+ {
+ this.replacement = replacement;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRuleAction.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRuleAction.java
new file mode 100644
index 00000000..ff0c0e52
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleRuleAction.java
@@ -0,0 +1,34 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SearchTermModifierRuleAppendToTermAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+AppendToTermAction, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRuleRemoveFromTermAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+RemoveFromTermAction, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRuleReplaceTermAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+ReplaceTermAction, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRuleReplaceWordsInTermAction.class, name = "Relewise.Client.DataTypes.Search.Rules.SearchTermModifierRule+ReplaceWordsInTermAction, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchTermModifierRuleRuleAction
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesRequest.java
new file mode 100644
index 00000000..d56878d1
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesRequest.java
@@ -0,0 +1,56 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SavePredictionRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SavePredictionRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchTermModifierRuleSaveSearchRulesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public SearchTermModifierRule[] rules;
+ public String modifiedBy;
+ public SearchTermModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public String getModifiedBy()
+ {
+ return this.modifiedBy;
+ }
+ public SearchTermModifierRuleSaveSearchRulesRequest setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchTermModifierRuleSaveSearchRulesRequest setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesResponse.java
new file mode 100644
index 00000000..fdbc350f
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSaveSearchRulesResponse.java
@@ -0,0 +1,50 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SavePredictionRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SavePredictionRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveRedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveRedirectRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveDecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveDecompoundRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveStemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveStemmingRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchTermModifierRuleSaveSearchRulesResponse extends TimedResponse
+{
+ public String $type = "";
+ public SearchTermModifierRule[] rules;
+ public SearchTermModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public SearchTermModifierRuleSaveSearchRulesResponse setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRuleSaveSearchRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSearchRulesResponse.java
new file mode 100644
index 00000000..cd6d3a23
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRuleSearchRulesResponse.java
@@ -0,0 +1,62 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = PredictionRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.PredictionRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchTermModifierRuleSearchRulesResponse extends TimedResponse
+{
+ public String $type = "";
+ public SearchTermModifierRule[] rules;
+ public Integer hits;
+ public SearchTermModifierRule[] getRules()
+ {
+ return this.rules;
+ }
+ public Integer getHits()
+ {
+ return this.hits;
+ }
+ public SearchTermModifierRuleSearchRulesResponse setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchTermModifierRuleSearchRulesResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRuleSearchRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequest.java
new file mode 100644
index 00000000..6a7bbb69
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequest.java
@@ -0,0 +1,67 @@
+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 = SearchTermModifierRulesRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRulesRequest extends SearchTermModifierRulesRequestSortBySearchRulesRequest
+{
+ public String $type = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client";
+ public static SearchTermModifierRulesRequest create(SearchRuleFilters filters, SearchTermModifierRulesRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ return new SearchTermModifierRulesRequest(filters, sorting, skip, take);
+ }
+ public SearchTermModifierRulesRequest(SearchRuleFilters filters, SearchTermModifierRulesRequestSortBySorting sorting, Integer skip, Integer take)
+ {
+ this.filters = filters;
+ this.sorting = sorting;
+ this.skip = skip;
+ this.take = take;
+ }
+ public SearchTermModifierRulesRequest()
+ {
+ }
+ @Override
+ public SearchTermModifierRulesRequest setFilters(SearchRuleFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRulesRequest setSorting(SearchTermModifierRulesRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRulesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRulesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBy.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBy.java
new file mode 100644
index 00000000..9a6e168b
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBy.java
@@ -0,0 +1,32 @@
+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 enum SearchTermModifierRulesRequestSortBy
+{
+ Created {
+ public String toString() {
+ return "Created";
+ }
+ },
+ Modified {
+ public String toString() {
+ return "Modified";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySearchRulesRequest.java
new file mode 100644
index 00000000..0c6ab43e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySearchRulesRequest.java
@@ -0,0 +1,76 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = PredictionRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.PredictionRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SearchTermModifierRulesRequestSortBySearchRulesRequest extends LicensedRequest
+{
+ public String $type = "";
+ public SearchRuleFilters filters;
+ public SearchTermModifierRulesRequestSortBySorting sorting;
+ public Integer skip;
+ public Integer take;
+ public SearchRuleFilters getFilters()
+ {
+ return this.filters;
+ }
+ public SearchTermModifierRulesRequestSortBySorting getSorting()
+ {
+ return this.sorting;
+ }
+ public Integer getSkip()
+ {
+ return this.skip;
+ }
+ public Integer getTake()
+ {
+ return this.take;
+ }
+ public SearchTermModifierRulesRequestSortBySearchRulesRequest setFilters(SearchRuleFilters filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+ public SearchTermModifierRulesRequestSortBySearchRulesRequest setSorting(SearchTermModifierRulesRequestSortBySorting sorting)
+ {
+ this.sorting = sorting;
+ return this;
+ }
+ public SearchTermModifierRulesRequestSortBySearchRulesRequest setSkip(Integer skip)
+ {
+ this.skip = skip;
+ return this;
+ }
+ public SearchTermModifierRulesRequestSortBySearchRulesRequest setTake(Integer take)
+ {
+ this.take = take;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySorting.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySorting.java
new file mode 100644
index 00000000..3d40f889
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesRequestSortBySorting.java
@@ -0,0 +1,55 @@
+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 SearchTermModifierRulesRequestSortBySorting
+{
+ public SearchTermModifierRulesRequestSortBy sortBy;
+ public SortOrder sortOrder;
+ public static SearchTermModifierRulesRequestSortBySorting create(SearchTermModifierRulesRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ return new SearchTermModifierRulesRequestSortBySorting(sortBy, sortOrder);
+ }
+ public SearchTermModifierRulesRequestSortBySorting(SearchTermModifierRulesRequestSortBy sortBy, SortOrder sortOrder)
+ {
+ this.sortBy = sortBy;
+ this.sortOrder = sortOrder;
+ }
+ public SearchTermModifierRulesRequestSortBySorting()
+ {
+ }
+ public SearchTermModifierRulesRequestSortBy getSortBy()
+ {
+ return this.sortBy;
+ }
+ public SortOrder getSortOrder()
+ {
+ return this.sortOrder;
+ }
+ public SearchTermModifierRulesRequestSortBySorting setSortBy(SearchTermModifierRulesRequestSortBy sortBy)
+ {
+ this.sortBy = sortBy;
+ return this;
+ }
+ public SearchTermModifierRulesRequestSortBySorting setSortOrder(SortOrder sortOrder)
+ {
+ this.sortOrder = sortOrder;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesResponse.java b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesResponse.java
new file mode 100644
index 00000000..d36f8764
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SearchTermModifierRulesResponse.java
@@ -0,0 +1,73 @@
+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 = SearchTermModifierRulesResponse.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class SearchTermModifierRulesResponse extends SearchTermModifierRuleSearchRulesResponse
+{
+ public String $type = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client";
+ public static SearchTermModifierRulesResponse create(SearchTermModifierRule[] rules, Integer hits)
+ {
+ return new SearchTermModifierRulesResponse(rules, hits);
+ }
+ public SearchTermModifierRulesResponse(SearchTermModifierRule[] rules, Integer hits)
+ {
+ this.rules = rules;
+ this.hits = hits;
+ }
+ public SearchTermModifierRulesResponse()
+ {
+ }
+ @Override
+ public SearchTermModifierRulesResponse setRules(SearchTermModifierRule... rules)
+ {
+ this.rules = rules;
+ return this;
+ }
+ public SearchTermModifierRulesResponse addToRules(SearchTermModifierRule rule)
+ {
+ if (this.rules == null)
+ {
+ this.rules = new SearchTermModifierRule[] { rule };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.rules));
+ existingList.add(rule);
+ this.rules = existingList.toArray(new SearchTermModifierRule[0]);
+ }
+ return this;
+ }
+ @Override
+ public SearchTermModifierRulesResponse setHits(Integer hits)
+ {
+ this.hits = hits;
+ return this;
+ }
+ @Override
+ public SearchTermModifierRulesResponse setStatistics(Statistics statistics)
+ {
+ this.statistics = statistics;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SearchTermPredictionRequest.java b/src/src/main/java/com/relewise/client/model/SearchTermPredictionRequest.java
index 5e169079..a06bb508 100644
--- a/src/src/main/java/com/relewise/client/model/SearchTermPredictionRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SearchTermPredictionRequest.java
@@ -134,4 +134,11 @@ public SearchTermPredictionRequest setPostFilters(FilterCollection postFilters)
this.postFilters = postFilters;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SearchTermPredictionRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SelectedCategoryPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedCategoryPropertiesSettings.java
new file mode 100644
index 00000000..819c5b25
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SelectedCategoryPropertiesSettings.java
@@ -0,0 +1,106 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SelectedProductCategoryPropertiesSettings.class, name = "Relewise.Client.Requests.Shared.SelectedProductCategoryPropertiesSettings, Relewise.Client"),
+ @JsonSubTypes.Type(value = SelectedContentCategoryPropertiesSettings.class, name = "Relewise.Client.Requests.Shared.SelectedContentCategoryPropertiesSettings, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class SelectedCategoryPropertiesSettings
+{
+ public String $type = "";
+ public Boolean displayName;
+ public Boolean paths;
+ public Boolean assortments;
+ public Boolean viewedByUserInfo;
+ public Boolean allData;
+ public String[] dataKeys;
+ public Boolean getDisplayName()
+ {
+ return this.displayName;
+ }
+ public Boolean getPaths()
+ {
+ return this.paths;
+ }
+ public Boolean getAssortments()
+ {
+ return this.assortments;
+ }
+ public Boolean getViewedByUserInfo()
+ {
+ return this.viewedByUserInfo;
+ }
+ public Boolean getAllData()
+ {
+ return this.allData;
+ }
+ public String[] getDataKeys()
+ {
+ return this.dataKeys;
+ }
+ public SelectedCategoryPropertiesSettings setDisplayName(Boolean displayName)
+ {
+ this.displayName = displayName;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings setPaths(Boolean paths)
+ {
+ this.paths = paths;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings setAssortments(Boolean assortments)
+ {
+ this.assortments = assortments;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings setViewedByUserInfo(Boolean viewedByUserInfo)
+ {
+ this.viewedByUserInfo = viewedByUserInfo;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings setAllData(Boolean allData)
+ {
+ this.allData = allData;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings setDataKeys(String... dataKeys)
+ {
+ this.dataKeys = dataKeys;
+ return this;
+ }
+ public SelectedCategoryPropertiesSettings 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;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SelectedContentCategoryPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedContentCategoryPropertiesSettings.java
index 3281bb35..27388e24 100644
--- a/src/src/main/java/com/relewise/client/model/SelectedContentCategoryPropertiesSettings.java
+++ b/src/src/main/java/com/relewise/client/model/SelectedContentCategoryPropertiesSettings.java
@@ -17,15 +17,15 @@
import java.util.Set;
import java.util.HashSet;
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SelectedContentCategoryPropertiesSettings.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SelectedContentCategoryPropertiesSettings
+public class SelectedContentCategoryPropertiesSettings extends SelectedCategoryPropertiesSettings
{
- public Boolean displayName;
- public Boolean paths;
- public Boolean assortments;
- public Boolean viewedByUserInfo;
- public Boolean allData;
- public String[] dataKeys;
+ public String $type = "Relewise.Client.Requests.Shared.SelectedContentCategoryPropertiesSettings, Relewise.Client";
public static SelectedContentCategoryPropertiesSettings create()
{
return new SelectedContentCategoryPropertiesSettings();
@@ -33,55 +33,37 @@ public static SelectedContentCategoryPropertiesSettings create()
public SelectedContentCategoryPropertiesSettings()
{
}
- public Boolean getDisplayName()
- {
- return this.displayName;
- }
- public Boolean getPaths()
- {
- return this.paths;
- }
- public Boolean getAssortments()
- {
- return this.assortments;
- }
- public Boolean getViewedByUserInfo()
- {
- return this.viewedByUserInfo;
- }
- public Boolean getAllData()
- {
- return this.allData;
- }
- public String[] getDataKeys()
- {
- return this.dataKeys;
- }
+ @Override
public SelectedContentCategoryPropertiesSettings setDisplayName(Boolean displayName)
{
this.displayName = displayName;
return this;
}
+ @Override
public SelectedContentCategoryPropertiesSettings setPaths(Boolean paths)
{
this.paths = paths;
return this;
}
+ @Override
public SelectedContentCategoryPropertiesSettings setAssortments(Boolean assortments)
{
this.assortments = assortments;
return this;
}
+ @Override
public SelectedContentCategoryPropertiesSettings setViewedByUserInfo(Boolean viewedByUserInfo)
{
this.viewedByUserInfo = viewedByUserInfo;
return this;
}
+ @Override
public SelectedContentCategoryPropertiesSettings setAllData(Boolean allData)
{
this.allData = allData;
return this;
}
+ @Override
public SelectedContentCategoryPropertiesSettings setDataKeys(String... dataKeys)
{
this.dataKeys = dataKeys;
diff --git a/src/src/main/java/com/relewise/client/model/SelectedProductCategoryPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedProductCategoryPropertiesSettings.java
index b9b789b1..ab1c7bfa 100644
--- a/src/src/main/java/com/relewise/client/model/SelectedProductCategoryPropertiesSettings.java
+++ b/src/src/main/java/com/relewise/client/model/SelectedProductCategoryPropertiesSettings.java
@@ -17,15 +17,15 @@
import java.util.Set;
import java.util.HashSet;
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = SelectedProductCategoryPropertiesSettings.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class SelectedProductCategoryPropertiesSettings
+public class SelectedProductCategoryPropertiesSettings extends SelectedCategoryPropertiesSettings
{
- public Boolean displayName;
- public Boolean paths;
- public Boolean assortments;
- public Boolean viewedByUserInfo;
- public Boolean allData;
- public String[] dataKeys;
+ public String $type = "Relewise.Client.Requests.Shared.SelectedProductCategoryPropertiesSettings, Relewise.Client";
public static SelectedProductCategoryPropertiesSettings create()
{
return new SelectedProductCategoryPropertiesSettings();
@@ -33,55 +33,37 @@ public static SelectedProductCategoryPropertiesSettings create()
public SelectedProductCategoryPropertiesSettings()
{
}
- public Boolean getDisplayName()
- {
- return this.displayName;
- }
- public Boolean getPaths()
- {
- return this.paths;
- }
- public Boolean getAssortments()
- {
- return this.assortments;
- }
- public Boolean getViewedByUserInfo()
- {
- return this.viewedByUserInfo;
- }
- public Boolean getAllData()
- {
- return this.allData;
- }
- public String[] getDataKeys()
- {
- return this.dataKeys;
- }
+ @Override
public SelectedProductCategoryPropertiesSettings setDisplayName(Boolean displayName)
{
this.displayName = displayName;
return this;
}
+ @Override
public SelectedProductCategoryPropertiesSettings setPaths(Boolean paths)
{
this.paths = paths;
return this;
}
+ @Override
public SelectedProductCategoryPropertiesSettings setAssortments(Boolean assortments)
{
this.assortments = assortments;
return this;
}
+ @Override
public SelectedProductCategoryPropertiesSettings setViewedByUserInfo(Boolean viewedByUserInfo)
{
this.viewedByUserInfo = viewedByUserInfo;
return this;
}
+ @Override
public SelectedProductCategoryPropertiesSettings setAllData(Boolean allData)
{
this.allData = allData;
return this;
}
+ @Override
public SelectedProductCategoryPropertiesSettings setDataKeys(String... dataKeys)
{
this.dataKeys = dataKeys;
diff --git a/src/src/main/java/com/relewise/client/model/SelectedProductPropertiesSettings.java b/src/src/main/java/com/relewise/client/model/SelectedProductPropertiesSettings.java
index f30fb8c1..c7735a34 100644
--- a/src/src/main/java/com/relewise/client/model/SelectedProductPropertiesSettings.java
+++ b/src/src/main/java/com/relewise/client/model/SelectedProductPropertiesSettings.java
@@ -30,6 +30,9 @@ public class SelectedProductPropertiesSettings
public Boolean brand;
public Boolean allVariants;
public @Nullable String[] dataKeys;
+ public Boolean viewedByUserCompanyInfo;
+ public Boolean purchasedByUserCompanyInfo;
+ public @Nullable FilteredVariantsSettings filteredVariants;
public static SelectedProductPropertiesSettings create()
{
return new SelectedProductPropertiesSettings();
@@ -77,6 +80,18 @@ public Boolean getAllVariants()
{
return this.dataKeys;
}
+ public Boolean getViewedByUserCompanyInfo()
+ {
+ return this.viewedByUserCompanyInfo;
+ }
+ public Boolean getPurchasedByUserCompanyInfo()
+ {
+ return this.purchasedByUserCompanyInfo;
+ }
+ public @Nullable FilteredVariantsSettings getFilteredVariants()
+ {
+ return this.filteredVariants;
+ }
public SelectedProductPropertiesSettings setDisplayName(Boolean displayName)
{
this.displayName = displayName;
@@ -141,4 +156,19 @@ public SelectedProductPropertiesSettings addToDataKeys(String dataKey)
}
return this;
}
+ public SelectedProductPropertiesSettings setViewedByUserCompanyInfo(Boolean viewedByUserCompanyInfo)
+ {
+ this.viewedByUserCompanyInfo = viewedByUserCompanyInfo;
+ return this;
+ }
+ public SelectedProductPropertiesSettings setPurchasedByUserCompanyInfo(Boolean purchasedByUserCompanyInfo)
+ {
+ this.purchasedByUserCompanyInfo = purchasedByUserCompanyInfo;
+ return this;
+ }
+ public SelectedProductPropertiesSettings setFilteredVariants(FilteredVariantsSettings filteredVariants)
+ {
+ this.filteredVariants = filteredVariants;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SimilarProductsEvaluationSettings.java b/src/src/main/java/com/relewise/client/model/SimilarProductsEvaluationSettings.java
index 69c8f141..57015be8 100644
--- a/src/src/main/java/com/relewise/client/model/SimilarProductsEvaluationSettings.java
+++ b/src/src/main/java/com/relewise/client/model/SimilarProductsEvaluationSettings.java
@@ -31,6 +31,7 @@ public class SimilarProductsEvaluationSettings
public @Nullable ArrayList significantProductDataFields;
public Double significanceOfSimilarSalesPrice;
public Double significanceOfSimilarBrand;
+ public @Nullable SimilarVariantEvaluationSettings variantEvaluationSettings;
public static SimilarProductsEvaluationSettings create()
{
return new SimilarProductsEvaluationSettings();
@@ -82,6 +83,10 @@ public Double getSignificanceOfSimilarBrand()
{
return this.significanceOfSimilarBrand;
}
+ public @Nullable SimilarVariantEvaluationSettings getVariantEvaluationSettings()
+ {
+ return this.variantEvaluationSettings;
+ }
public SimilarProductsEvaluationSettings setSignificanceOfSimilaritiesInDisplayName(Double significanceOfSimilaritiesInDisplayName)
{
this.significanceOfSimilaritiesInDisplayName = significanceOfSimilaritiesInDisplayName;
@@ -146,4 +151,9 @@ public SimilarProductsEvaluationSettings setSignificanceOfSimilarBrand(Double si
this.significanceOfSimilarBrand = significanceOfSimilarBrand;
return this;
}
+ public SimilarProductsEvaluationSettings setVariantEvaluationSettings(SimilarVariantEvaluationSettings variantEvaluationSettings)
+ {
+ this.variantEvaluationSettings = variantEvaluationSettings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SimilarProductsRequest.java b/src/src/main/java/com/relewise/client/model/SimilarProductsRequest.java
index e9846067..f2ce6841 100644
--- a/src/src/main/java/com/relewise/client/model/SimilarProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SimilarProductsRequest.java
@@ -30,6 +30,7 @@ public class SimilarProductsRequest extends ProductRecommendationRequest impleme
public @Nullable Product productData;
public Boolean considerAlreadyKnownInformationAboutProduct;
public @Nullable SimilarProductsEvaluationSettings evaluationSettings;
+ public @Nullable Integer explodedVariants;
public static SimilarProductsRequest create(@Nullable Language language, @Nullable Currency currency, String displayedAtLocationType, User user, Product productData, Boolean considerAlreadyKnownInformationAboutProduct)
{
return new SimilarProductsRequest(language, currency, displayedAtLocationType, user, productData, considerAlreadyKnownInformationAboutProduct);
@@ -104,6 +105,10 @@ public Boolean getConsiderAlreadyKnownInformationAboutProduct()
{
return this.evaluationSettings;
}
+ public @Nullable Integer getExplodedVariants()
+ {
+ return this.explodedVariants;
+ }
public SimilarProductsRequest setExistingProductId(ProductAndVariantId existingProductId)
{
this.existingProductId = existingProductId;
@@ -124,6 +129,11 @@ public SimilarProductsRequest setEvaluationSettings(SimilarProductsEvaluationSet
this.evaluationSettings = evaluationSettings;
return this;
}
+ public SimilarProductsRequest setExplodedVariants(@Nullable Integer explodedVariants)
+ {
+ this.explodedVariants = explodedVariants;
+ return this;
+ }
@Override
public SimilarProductsRequest setSettings(ProductRecommendationRequestSettings settings)
{
@@ -166,4 +176,11 @@ public SimilarProductsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SimilarProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SimilarVariantEvaluationSettings.java b/src/src/main/java/com/relewise/client/model/SimilarVariantEvaluationSettings.java
new file mode 100644
index 00000000..30cfa980
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/SimilarVariantEvaluationSettings.java
@@ -0,0 +1,99 @@
+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 SimilarVariantEvaluationSettings
+{
+ public @Nullable Double significanceOfSimilaritiesInDisplayName;
+ public @Nullable Double significanceOfSimilarListPrice;
+ public @Nullable Double significanceOfSimilarSalesPrice;
+ public @Nullable Double significanceOfCommonDataKeys;
+ public @Nullable Double significanceOfIdenticalDataValues;
+ public @Nullable ArrayList significantDataFields;
+ public static SimilarVariantEvaluationSettings create()
+ {
+ return new SimilarVariantEvaluationSettings();
+ }
+ public SimilarVariantEvaluationSettings()
+ {
+ }
+ public @Nullable Double getSignificanceOfSimilaritiesInDisplayName()
+ {
+ return this.significanceOfSimilaritiesInDisplayName;
+ }
+ public @Nullable Double getSignificanceOfSimilarListPrice()
+ {
+ return this.significanceOfSimilarListPrice;
+ }
+ public @Nullable Double getSignificanceOfSimilarSalesPrice()
+ {
+ return this.significanceOfSimilarSalesPrice;
+ }
+ public @Nullable Double getSignificanceOfCommonDataKeys()
+ {
+ return this.significanceOfCommonDataKeys;
+ }
+ public @Nullable Double getSignificanceOfIdenticalDataValues()
+ {
+ return this.significanceOfIdenticalDataValues;
+ }
+ public @Nullable ArrayList getSignificantDataFields()
+ {
+ return this.significantDataFields;
+ }
+ public SimilarVariantEvaluationSettings setSignificanceOfSimilaritiesInDisplayName(@Nullable Double significanceOfSimilaritiesInDisplayName)
+ {
+ this.significanceOfSimilaritiesInDisplayName = significanceOfSimilaritiesInDisplayName;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings setSignificanceOfSimilarListPrice(@Nullable Double significanceOfSimilarListPrice)
+ {
+ this.significanceOfSimilarListPrice = significanceOfSimilarListPrice;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings setSignificanceOfSimilarSalesPrice(@Nullable Double significanceOfSimilarSalesPrice)
+ {
+ this.significanceOfSimilarSalesPrice = significanceOfSimilarSalesPrice;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings setSignificanceOfCommonDataKeys(@Nullable Double significanceOfCommonDataKeys)
+ {
+ this.significanceOfCommonDataKeys = significanceOfCommonDataKeys;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings setSignificanceOfIdenticalDataValues(@Nullable Double significanceOfIdenticalDataValues)
+ {
+ this.significanceOfIdenticalDataValues = significanceOfIdenticalDataValues;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings setSignificantDataFields(SignificantDataValue... significantDataFields)
+ {
+ this.significantDataFields = new ArrayList<>(Arrays.asList(significantDataFields));;
+ return this;
+ }
+ public SimilarVariantEvaluationSettings addToSignificantDataFields(SignificantDataValue significantDataFields)
+ {
+ if (this.significantDataFields == null)
+ {
+ this.significantDataFields = new ArrayList<>();
+ }
+ this.significantDataFields.add(significantDataFields);
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/SortProductsRequest.java b/src/src/main/java/com/relewise/client/model/SortProductsRequest.java
index c9aa7306..c50ace6a 100644
--- a/src/src/main/java/com/relewise/client/model/SortProductsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SortProductsRequest.java
@@ -106,4 +106,11 @@ public SortProductsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SortProductsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/SortVariantsRequest.java b/src/src/main/java/com/relewise/client/model/SortVariantsRequest.java
index 076e8c59..1c3daa6e 100644
--- a/src/src/main/java/com/relewise/client/model/SortVariantsRequest.java
+++ b/src/src/main/java/com/relewise/client/model/SortVariantsRequest.java
@@ -93,4 +93,11 @@ public SortVariantsRequest setCurrency(Currency currency)
this.currency = currency;
return this;
}
+ /** @deprecated Use User.Channel instead. */
+ @Override
+ public SortVariantsRequest setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/StemmingRule.java b/src/src/main/java/com/relewise/client/model/StemmingRule.java
index f126aea4..e321937d 100644
--- a/src/src/main/java/com/relewise/client/model/StemmingRule.java
+++ b/src/src/main/java/com/relewise/client/model/StemmingRule.java
@@ -25,7 +25,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class StemmingRule extends SearchRule
{
- public String $type = "Relewise.Client.DataTypes.Search.Configuration.SearchRules.StemmingRule, Relewise.Client";
+ public String $type = "Relewise.Client.DataTypes.Search.Rules.StemmingRule, Relewise.Client";
public String[] words;
public @Nullable String stem;
public static StemmingRule create(UUID id, @Nullable ApplicableIndexes indexes, @Nullable ApplicableLanguages languages, Boolean isApproved, String[] words, String stem)
diff --git a/src/src/main/java/com/relewise/client/model/StemmingRuleSaveSearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/StemmingRuleSaveSearchRulesRequest.java
index 052ac234..8142262c 100644
--- a/src/src/main/java/com/relewise/client/model/StemmingRuleSaveSearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/StemmingRuleSaveSearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = SaveRedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveRedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveDecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveDecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = SaveStemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SaveStemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SaveSearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SaveSearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class StemmingRuleSaveSearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/StemmingRuleSearchRulesResponse.java b/src/src/main/java/com/relewise/client/model/StemmingRuleSearchRulesResponse.java
index 89ba4637..9165641c 100644
--- a/src/src/main/java/com/relewise/client/model/StemmingRuleSearchRulesResponse.java
+++ b/src/src/main/java/com/relewise/client/model/StemmingRuleSearchRulesResponse.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.RedirectRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.DecompoundRulesResponse, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.StemmingRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchTermModifierRulesResponse, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesResponse.class, name = "Relewise.Client.Responses.Search.Rules.SearchResultModifierRulesResponse, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class StemmingRuleSearchRulesResponse extends TimedResponse
diff --git a/src/src/main/java/com/relewise/client/model/StemmingRulesRequestSortBySearchRulesRequest.java b/src/src/main/java/com/relewise/client/model/StemmingRulesRequestSortBySearchRulesRequest.java
index 5f34a6c6..d0247f1f 100644
--- a/src/src/main/java/com/relewise/client/model/StemmingRulesRequestSortBySearchRulesRequest.java
+++ b/src/src/main/java/com/relewise/client/model/StemmingRulesRequestSortBySearchRulesRequest.java
@@ -26,6 +26,8 @@
@JsonSubTypes.Type(value = RedirectRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.RedirectRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = DecompoundRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.DecompoundRulesRequest, Relewise.Client"),
@JsonSubTypes.Type(value = StemmingRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.StemmingRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchTermModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchTermModifierRulesRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = SearchResultModifierRulesRequest.class, name = "Relewise.Client.Requests.Search.Rules.SearchResultModifierRulesRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class StemmingRulesRequestSortBySearchRulesRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/StringAbandonedSearch.java b/src/src/main/java/com/relewise/client/model/StringAbandonedSearch.java
index 8c52836c..1bcd0547 100644
--- a/src/src/main/java/com/relewise/client/model/StringAbandonedSearch.java
+++ b/src/src/main/java/com/relewise/client/model/StringAbandonedSearch.java
@@ -49,4 +49,10 @@ public StringAbandonedSearch setHits(Integer hits)
this.hits = hits;
return this;
}
+ @Override
+ public StringAbandonedSearch setLanguage(Language language)
+ {
+ this.language = language;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/TimeUnit.java b/src/src/main/java/com/relewise/client/model/TimeUnit.java
new file mode 100644
index 00000000..ee4c9e20
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/TimeUnit.java
@@ -0,0 +1,37 @@
+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 enum TimeUnit
+{
+ UnixMilliseconds {
+ public String toString() {
+ return "UnixMilliseconds";
+ }
+ },
+ UnixSeconds {
+ public String toString() {
+ return "UnixSeconds";
+ }
+ },
+ UnixMinutes {
+ public String toString() {
+ return "UnixMinutes";
+ }
+ },
+}
diff --git a/src/src/main/java/com/relewise/client/model/TrackCompanyAdministrativeActionRequest.java b/src/src/main/java/com/relewise/client/model/TrackCompanyAdministrativeActionRequest.java
new file mode 100644
index 00000000..97feaba4
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/TrackCompanyAdministrativeActionRequest.java
@@ -0,0 +1,50 @@
+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 = TrackCompanyAdministrativeActionRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class TrackCompanyAdministrativeActionRequest extends TrackingRequest
+{
+ public String $type = "Relewise.Client.Requests.Tracking.TrackCompanyAdministrativeActionRequest, Relewise.Client";
+ public CompanyAdministrativeAction administrativeAction;
+ public static TrackCompanyAdministrativeActionRequest create(CompanyAdministrativeAction administrativeAction)
+ {
+ return new TrackCompanyAdministrativeActionRequest(administrativeAction);
+ }
+ public TrackCompanyAdministrativeActionRequest(CompanyAdministrativeAction administrativeAction)
+ {
+ this.administrativeAction = administrativeAction;
+ }
+ public TrackCompanyAdministrativeActionRequest()
+ {
+ }
+ public CompanyAdministrativeAction getAdministrativeAction()
+ {
+ return this.administrativeAction;
+ }
+ public TrackCompanyAdministrativeActionRequest setAdministrativeAction(CompanyAdministrativeAction administrativeAction)
+ {
+ this.administrativeAction = administrativeAction;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/TrackCompanyUpdateRequest.java b/src/src/main/java/com/relewise/client/model/TrackCompanyUpdateRequest.java
new file mode 100644
index 00000000..e43e713e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/TrackCompanyUpdateRequest.java
@@ -0,0 +1,50 @@
+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 = TrackCompanyUpdateRequest.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class TrackCompanyUpdateRequest extends TrackingRequest
+{
+ public String $type = "Relewise.Client.Requests.Tracking.TrackCompanyUpdateRequest, Relewise.Client";
+ public CompanyUpdate companyUpdate;
+ public static TrackCompanyUpdateRequest create(CompanyUpdate companyUpdate)
+ {
+ return new TrackCompanyUpdateRequest(companyUpdate);
+ }
+ public TrackCompanyUpdateRequest(CompanyUpdate companyUpdate)
+ {
+ this.companyUpdate = companyUpdate;
+ }
+ public TrackCompanyUpdateRequest()
+ {
+ }
+ public CompanyUpdate getCompanyUpdate()
+ {
+ return this.companyUpdate;
+ }
+ public TrackCompanyUpdateRequest setCompanyUpdate(CompanyUpdate companyUpdate)
+ {
+ this.companyUpdate = companyUpdate;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/Trackable.java b/src/src/main/java/com/relewise/client/model/Trackable.java
index e43aa370..4acbcb72 100644
--- a/src/src/main/java/com/relewise/client/model/Trackable.java
+++ b/src/src/main/java/com/relewise/client/model/Trackable.java
@@ -41,6 +41,8 @@
@JsonSubTypes.Type(value = ContentCategoryAdministrativeAction.class, name = "Relewise.Client.DataTypes.ContentCategoryAdministrativeAction, Relewise.Client"),
@JsonSubTypes.Type(value = ContentCategoryView.class, name = "Relewise.Client.DataTypes.ContentCategoryView, Relewise.Client"),
@JsonSubTypes.Type(value = ContentCategoryUpdate.class, name = "Relewise.Client.DataTypes.ContentCategoryUpdate, Relewise.Client"),
+ @JsonSubTypes.Type(value = CompanyUpdate.class, name = "Relewise.Client.DataTypes.CompanyUpdate, Relewise.Client"),
+ @JsonSubTypes.Type(value = CompanyAdministrativeAction.class, name = "Relewise.Client.DataTypes.CompanyAdministrativeAction, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class Trackable
diff --git a/src/src/main/java/com/relewise/client/model/TrackingRequest.java b/src/src/main/java/com/relewise/client/model/TrackingRequest.java
index 58d76052..f8d09c5a 100644
--- a/src/src/main/java/com/relewise/client/model/TrackingRequest.java
+++ b/src/src/main/java/com/relewise/client/model/TrackingRequest.java
@@ -42,6 +42,8 @@
@JsonSubTypes.Type(value = TrackContentCategoryViewRequest.class, name = "Relewise.Client.Requests.Tracking.TrackContentCategoryViewRequest, Relewise.Client"),
@JsonSubTypes.Type(value = TrackContentCategoryUpdateRequest.class, name = "Relewise.Client.Requests.Tracking.TrackContentCategoryUpdateRequest, Relewise.Client"),
@JsonSubTypes.Type(value = TrackContentCategoryAdministrativeActionRequest.class, name = "Relewise.Client.Requests.Tracking.TrackContentCategoryAdministrativeActionRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = TrackCompanyUpdateRequest.class, name = "Relewise.Client.Requests.Tracking.TrackCompanyUpdateRequest, Relewise.Client"),
+ @JsonSubTypes.Type(value = TrackCompanyAdministrativeActionRequest.class, name = "Relewise.Client.Requests.Tracking.TrackCompanyAdministrativeActionRequest, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class TrackingRequest extends LicensedRequest
diff --git a/src/src/main/java/com/relewise/client/model/TriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/TriggerConfiguration.java
index ca7b996e..8bf5e1c6 100644
--- a/src/src/main/java/com/relewise/client/model/TriggerConfiguration.java
+++ b/src/src/main/java/com/relewise/client/model/TriggerConfiguration.java
@@ -28,6 +28,8 @@
@JsonSubTypes.Type(value = UserActivityTriggerConfiguration.class, name = "Relewise.Client.DataTypes.Triggers.Configurations.UserActivityTriggerConfiguration, Relewise.Client"),
@JsonSubTypes.Type(value = ContentCategoryInterestTriggerConfiguration.class, name = "Relewise.Client.DataTypes.Triggers.Configurations.ContentCategoryInterestTriggerConfiguration, Relewise.Client"),
@JsonSubTypes.Type(value = AbandonedSearchTriggerConfiguration.class, name = "Relewise.Client.DataTypes.Triggers.Configurations.AbandonedSearchTriggerConfiguration, Relewise.Client"),
+ @JsonSubTypes.Type(value = ProductChangeTriggerConfiguration.class, name = "Relewise.Client.DataTypes.Triggers.Configurations.ProductChangeTriggerConfiguration, Relewise.Client"),
+ @JsonSubTypes.Type(value = VariantChangeTriggerConfiguration.class, name = "Relewise.Client.DataTypes.Triggers.Configurations.VariantChangeTriggerConfiguration, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class TriggerConfiguration
diff --git a/src/src/main/java/com/relewise/client/model/User.java b/src/src/main/java/com/relewise/client/model/User.java
index 3a72e147..9b0530de 100644
--- a/src/src/main/java/com/relewise/client/model/User.java
+++ b/src/src/main/java/com/relewise/client/model/User.java
@@ -32,8 +32,11 @@ public class User
public @Nullable HashMap identifiers;
/** Data stored on the user */
public @Nullable HashMap data;
- /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */
+ /** A fingerprint, highly likely to change in the future, e.g. between sessions */
public @Nullable String fingerprint;
+ public @Nullable Channel channel;
+ /** Company the user is associated with in the current context (Note: Companies themselves can be associated with a parent company, if the current user is acting on the behalf of a hierarchical chain of up to 2 companies) */
+ public @Nullable Company company;
/**
* User DTO
* @param authenticatedId A persistent Id for current user, e.g. a database-id
@@ -101,11 +104,20 @@ public User()
{
return this.data;
}
- /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */
+ /** A fingerprint, highly likely to change in the future, e.g. between sessions */
public @Nullable String getFingerprint()
{
return this.fingerprint;
}
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
+ /** Company the user is associated with in the current context (Note: Companies themselves can be associated with a parent company, if the current user is acting on the behalf of a hierarchical chain of up to 2 companies) */
+ public @Nullable Company getCompany()
+ {
+ return this.company;
+ }
/** A persistent Id for current user, e.g. a database-id This Id should never be expected to change in the future */
public User setAuthenticatedId(String authenticatedId)
{
@@ -172,10 +184,21 @@ public User setData(HashMap data)
this.data = data;
return this;
}
- /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */
+ /** A fingerprint, highly likely to change in the future, e.g. between sessions */
public User setFingerprint(String fingerprint)
{
this.fingerprint = fingerprint;
return this;
}
+ public User setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
+ /** Company the user is associated with in the current context (Note: Companies themselves can be associated with a parent company, if the current user is acting on the behalf of a hierarchical chain of up to 2 companies) */
+ public User setCompany(Company company)
+ {
+ this.company = company;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/UserAssociatedCompanyResultDetails.java b/src/src/main/java/com/relewise/client/model/UserAssociatedCompanyResultDetails.java
new file mode 100644
index 00000000..a8401c69
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/UserAssociatedCompanyResultDetails.java
@@ -0,0 +1,93 @@
+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 UserAssociatedCompanyResultDetails
+{
+ public String id;
+ public @Nullable UserAssociatedCompanyResultDetails parent;
+ public @Nullable HashMap data;
+ public OffsetDateTime createdUtc;
+ public OffsetDateTime lastAccessedUtc;
+ public static UserAssociatedCompanyResultDetails create(String id)
+ {
+ return new UserAssociatedCompanyResultDetails(id);
+ }
+ public UserAssociatedCompanyResultDetails(String id)
+ {
+ this.id = id;
+ }
+ public UserAssociatedCompanyResultDetails()
+ {
+ }
+ public String getId()
+ {
+ return this.id;
+ }
+ public @Nullable UserAssociatedCompanyResultDetails getParent()
+ {
+ return this.parent;
+ }
+ public @Nullable HashMap getData()
+ {
+ return this.data;
+ }
+ public OffsetDateTime getCreatedUtc()
+ {
+ return this.createdUtc;
+ }
+ public OffsetDateTime getLastAccessedUtc()
+ {
+ return this.lastAccessedUtc;
+ }
+ public UserAssociatedCompanyResultDetails setId(String id)
+ {
+ this.id = id;
+ return this;
+ }
+ public UserAssociatedCompanyResultDetails setParent(UserAssociatedCompanyResultDetails parent)
+ {
+ this.parent = parent;
+ return this;
+ }
+ public UserAssociatedCompanyResultDetails addToData(String key, DataValue value)
+ {
+ if (this.data == null)
+ {
+ this.data = new HashMap<>();
+ }
+ this.data.put(key, value);
+ return this;
+ }
+ public UserAssociatedCompanyResultDetails setData(HashMap data)
+ {
+ this.data = data;
+ return this;
+ }
+ public UserAssociatedCompanyResultDetails setCreatedUtc(OffsetDateTime createdUtc)
+ {
+ this.createdUtc = createdUtc;
+ return this;
+ }
+ public UserAssociatedCompanyResultDetails setLastAccessedUtc(OffsetDateTime lastAccessedUtc)
+ {
+ this.lastAccessedUtc = lastAccessedUtc;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/UserFavoriteProductRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/UserFavoriteProductRelevanceModifier.java
index 21b392f9..a459533d 100644
--- a/src/src/main/java/com/relewise/client/model/UserFavoriteProductRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/UserFavoriteProductRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Product depending on whether a product has been bought within some interval of minutes SinceMinutesAgo
from now, which can define complex modifiers depending on the number of purchases and how long time there has passed since the last purchase. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class UserFavoriteProductRelevanceModifier extends RelevanceModifier implements IProductRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.UserFavoriteProductRelevanceModifier, Relewise.Client";
+ /** The timespan in minutes up till now that a product should be considered relevant if it has been bought by the user. */
public Integer sinceMinutesAgo;
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public Double numberOfPurchasesWeight;
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public Double mostRecentPurchaseWeight;
+ /** The multiplier that decides how important more recent purchases should */
public Double ifNotPurchasedBaseWeight;
public static UserFavoriteProductRelevanceModifier create(Integer sinceMinutesAgo)
{
@@ -41,10 +46,24 @@ public UserFavoriteProductRelevanceModifier(Integer sinceMinutesAgo)
this.mostRecentPurchaseWeight = 1d;
this.ifNotPurchasedBaseWeight = 1d;
}
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether a product has been bought within some interval of minutes SinceMinutesAgo
from now, which can define complex modifiers depending on the number of purchases and how long time there has passed since the last purchase.
+ * @param sinceMinutesAgo The timespan in minutes up till now that a product should be considered relevant if it has been bought by the user.
+ * @param numberOfPurchasesWeight The multiplier that decides how important the amount of times the product has been bought is.
+ * @param mostRecentPurchaseWeight The multiplier that decides how important the amount of times the product has been bought is.
+ * @param ifNotPurchasedBaseWeight The multiplier that decides how important more recent purchases should
+ */
public static UserFavoriteProductRelevanceModifier create(Integer sinceMinutesAgo, Double numberOfPurchasesWeight, Double mostRecentPurchaseWeight, Double ifNotPurchasedBaseWeight)
{
return new UserFavoriteProductRelevanceModifier(sinceMinutesAgo, numberOfPurchasesWeight, mostRecentPurchaseWeight, ifNotPurchasedBaseWeight);
}
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Product depending on whether a product has been bought within some interval of minutes SinceMinutesAgo
from now, which can define complex modifiers depending on the number of purchases and how long time there has passed since the last purchase.
+ * @param sinceMinutesAgo The timespan in minutes up till now that a product should be considered relevant if it has been bought by the user.
+ * @param numberOfPurchasesWeight The multiplier that decides how important the amount of times the product has been bought is.
+ * @param mostRecentPurchaseWeight The multiplier that decides how important the amount of times the product has been bought is.
+ * @param ifNotPurchasedBaseWeight The multiplier that decides how important more recent purchases should
+ */
public UserFavoriteProductRelevanceModifier(Integer sinceMinutesAgo, Double numberOfPurchasesWeight, Double mostRecentPurchaseWeight, Double ifNotPurchasedBaseWeight)
{
this.sinceMinutesAgo = sinceMinutesAgo;
@@ -58,37 +77,45 @@ public UserFavoriteProductRelevanceModifier()
this.mostRecentPurchaseWeight = 1d;
this.ifNotPurchasedBaseWeight = 1d;
}
+ /** The timespan in minutes up till now that a product should be considered relevant if it has been bought by the user. */
public Integer getSinceMinutesAgo()
{
return this.sinceMinutesAgo;
}
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public Double getNumberOfPurchasesWeight()
{
return this.numberOfPurchasesWeight;
}
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public Double getMostRecentPurchaseWeight()
{
return this.mostRecentPurchaseWeight;
}
+ /** The multiplier that decides how important more recent purchases should */
public Double getIfNotPurchasedBaseWeight()
{
return this.ifNotPurchasedBaseWeight;
}
+ /** The timespan in minutes up till now that a product should be considered relevant if it has been bought by the user. */
public UserFavoriteProductRelevanceModifier setSinceMinutesAgo(Integer sinceMinutesAgo)
{
this.sinceMinutesAgo = sinceMinutesAgo;
return this;
}
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public UserFavoriteProductRelevanceModifier setNumberOfPurchasesWeight(Double numberOfPurchasesWeight)
{
this.numberOfPurchasesWeight = numberOfPurchasesWeight;
return this;
}
+ /** The multiplier that decides how important the amount of times the product has been bought is. */
public UserFavoriteProductRelevanceModifier setMostRecentPurchaseWeight(Double mostRecentPurchaseWeight)
{
this.mostRecentPurchaseWeight = mostRecentPurchaseWeight;
return this;
}
+ /** The multiplier that decides how important more recent purchases should */
public UserFavoriteProductRelevanceModifier setIfNotPurchasedBaseWeight(Double ifNotPurchasedBaseWeight)
{
this.ifNotPurchasedBaseWeight = ifNotPurchasedBaseWeight;
diff --git a/src/src/main/java/com/relewise/client/model/UserResultDetails.java b/src/src/main/java/com/relewise/client/model/UserResultDetails.java
index 879b0989..a522d5a3 100644
--- a/src/src/main/java/com/relewise/client/model/UserResultDetails.java
+++ b/src/src/main/java/com/relewise/client/model/UserResultDetails.java
@@ -35,6 +35,8 @@ public class UserResultDetails
public HashMap data;
/** All known temporary ids for the user */
public String[] temporaryIds;
+ public @Nullable Channel channel;
+ public @Nullable UserAssociatedCompanyResultDetails company;
public static UserResultDetails create()
{
return new UserResultDetails();
@@ -99,6 +101,14 @@ public String[] getTemporaryIds()
{
return this.temporaryIds;
}
+ public @Nullable Channel getChannel()
+ {
+ return this.channel;
+ }
+ public @Nullable UserAssociatedCompanyResultDetails getCompany()
+ {
+ return this.company;
+ }
public UserResultDetails setAuthenticatedId(String authenticatedId)
{
this.authenticatedId = authenticatedId;
@@ -221,4 +231,14 @@ public UserResultDetails addToTemporaryIds(String temporaryId)
}
return this;
}
+ public UserResultDetails setChannel(Channel channel)
+ {
+ this.channel = channel;
+ return this;
+ }
+ public UserResultDetails setCompany(UserAssociatedCompanyResultDetails company)
+ {
+ this.company = company;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/ValueCondition.java b/src/src/main/java/com/relewise/client/model/ValueCondition.java
index 9dfb2bc9..3e771809 100644
--- a/src/src/main/java/com/relewise/client/model/ValueCondition.java
+++ b/src/src/main/java/com/relewise/client/model/ValueCondition.java
@@ -27,16 +27,21 @@
@JsonSubTypes.Type(value = GreaterThanCondition.class, name = "Relewise.Client.Requests.Conditions.GreaterThanCondition, Relewise.Client"),
@JsonSubTypes.Type(value = LessThanCondition.class, name = "Relewise.Client.Requests.Conditions.LessThanCondition, Relewise.Client"),
@JsonSubTypes.Type(value = DistinctCondition.class, name = "Relewise.Client.Requests.Conditions.DistinctCondition, Relewise.Client"),
+ @JsonSubTypes.Type(value = RelativeDateTimeCondition.class, name = "Relewise.Client.Requests.Conditions.RelativeDateTimeCondition, Relewise.Client"),
+ @JsonSubTypes.Type(value = HasValueCondition.class, name = "Relewise.Client.Requests.Conditions.HasValueCondition, Relewise.Client"),
})
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class ValueCondition
{
public String $type = "";
+ /** Whether the condition should be negated / inverted */
public Boolean negated;
+ /** Whether the condition should be negated / inverted */
public Boolean getNegated()
{
return this.negated;
}
+ /** Whether the condition should be negated / inverted */
public ValueCondition setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/ValueConditionCollection.java b/src/src/main/java/com/relewise/client/model/ValueConditionCollection.java
index a10219b7..2d8837de 100644
--- a/src/src/main/java/com/relewise/client/model/ValueConditionCollection.java
+++ b/src/src/main/java/com/relewise/client/model/ValueConditionCollection.java
@@ -17,9 +17,11 @@
import java.util.Set;
import java.util.HashSet;
+/** a collection that contains multiple ValueCondition
s in its inner list Items
. */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ValueConditionCollection
{
+ /** The items that this collection holds. */
public @Nullable ArrayList items;
public static ValueConditionCollection create()
{
@@ -28,15 +30,18 @@ public static ValueConditionCollection create()
public ValueConditionCollection()
{
}
+ /** The items that this collection holds. */
public @Nullable ArrayList getItems()
{
return this.items;
}
+ /** The items that this collection holds. */
public ValueConditionCollection setItems(ValueCondition... items)
{
this.items = new ArrayList<>(Arrays.asList(items));;
return this;
}
+ /** The items that this collection holds. */
public ValueConditionCollection addToItems(ValueCondition items)
{
if (this.items == null)
diff --git a/src/src/main/java/com/relewise/client/model/VariantAssortmentFilter.java b/src/src/main/java/com/relewise/client/model/VariantAssortmentFilter.java
index 16476eed..79bc4e7b 100644
--- a/src/src/main/java/com/relewise/client/model/VariantAssortmentFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantAssortmentFilter.java
@@ -67,4 +67,10 @@ public VariantAssortmentFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantAssortmentFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantAssortmentRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantAssortmentRelevanceModifier.java
index 5b6216a3..7880ed04 100644
--- a/src/src/main/java/com/relewise/client/model/VariantAssortmentRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantAssortmentRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Variant depending on whether the Assortments match Assortments
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,7 +27,9 @@
public class VariantAssortmentRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantAssortmentRelevanceModifier, Relewise.Client";
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public Integer[] assortments;
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public Double multiplyWeightBy;
public static VariantAssortmentRelevanceModifier create()
{
@@ -44,19 +47,23 @@ public VariantAssortmentRelevanceModifier(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public Integer[] getAssortments()
{
return this.assortments;
}
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public VariantAssortmentRelevanceModifier setAssortments(Integer... assortments)
{
this.assortments = assortments;
return this;
}
+ /** The assortments that this RelevanceModifier
will multiply the weight for. */
public VariantAssortmentRelevanceModifier addToAssortments(Integer assortment)
{
if (this.assortments == null)
@@ -71,6 +78,7 @@ public VariantAssortmentRelevanceModifier addToAssortments(Integer assortment)
}
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public VariantAssortmentRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerConfiguration.java
new file mode 100644
index 00000000..2b3a2983
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerConfiguration.java
@@ -0,0 +1,155 @@
+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 = VariantChangeTriggerConfiguration.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VariantChangeTriggerConfiguration extends VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration
+{
+ public String $type = "Relewise.Client.DataTypes.Triggers.Configurations.VariantChangeTriggerConfiguration, Relewise.Client";
+ public static VariantChangeTriggerConfiguration create(String name, String description, VariantPropertySelector entityPropertySelector, IChange change, VariantChangeTriggerResultSettings resultSettings)
+ {
+ return new VariantChangeTriggerConfiguration(name, description, entityPropertySelector, change, resultSettings);
+ }
+ public VariantChangeTriggerConfiguration(String name, String description, VariantPropertySelector entityPropertySelector, IChange change, VariantChangeTriggerResultSettings resultSettings)
+ {
+ this.name = name;
+ this.description = description;
+ this.entityPropertySelector = entityPropertySelector;
+ this.change = change;
+ this.resultSettings = resultSettings;
+ }
+ public VariantChangeTriggerConfiguration()
+ {
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setEntityPropertySelector(VariantPropertySelector entityPropertySelector)
+ {
+ this.entityPropertySelector = entityPropertySelector;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setBeforeChangeFilters(FilterCollection beforeChangeFilters)
+ {
+ this.beforeChangeFilters = beforeChangeFilters;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setAfterChangeFilters(FilterCollection afterChangeFilters)
+ {
+ this.afterChangeFilters = afterChangeFilters;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setChange(IChange change)
+ {
+ this.change = change;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setResultSettings(VariantChangeTriggerResultSettings resultSettings)
+ {
+ this.resultSettings = resultSettings;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public VariantChangeTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResult.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResult.java
new file mode 100644
index 00000000..914fb16d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResult.java
@@ -0,0 +1,67 @@
+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 = VariantChangeTriggerResult.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VariantChangeTriggerResult extends VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult implements ITriggerResult
+{
+ public String $type = "Relewise.Client.Responses.Triggers.Results.VariantChangeTriggerResult, Relewise.Client";
+ public static VariantChangeTriggerResult create(UserResultDetails user, VariantChangeTriggerResultVariantChangeResultDetails... entitiesWithChanges)
+ {
+ return new VariantChangeTriggerResult(user, entitiesWithChanges);
+ }
+ public VariantChangeTriggerResult(UserResultDetails user, VariantChangeTriggerResultVariantChangeResultDetails... entitiesWithChanges)
+ {
+ this.user = user;
+ this.entitiesWithChanges = entitiesWithChanges;
+ }
+ public VariantChangeTriggerResult()
+ {
+ }
+ @Override
+ public VariantChangeTriggerResult setEntitiesWithChanges(VariantChangeTriggerResultVariantChangeResultDetails... entitiesWithChanges)
+ {
+ this.entitiesWithChanges = entitiesWithChanges;
+ return this;
+ }
+ public VariantChangeTriggerResult addToEntitiesWithChanges(VariantChangeTriggerResultVariantChangeResultDetails entitiesWithChange)
+ {
+ if (this.entitiesWithChanges == null)
+ {
+ this.entitiesWithChanges = new VariantChangeTriggerResultVariantChangeResultDetails[] { entitiesWithChange };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.entitiesWithChanges));
+ existingList.add(entitiesWithChange);
+ this.entitiesWithChanges = existingList.toArray(new VariantChangeTriggerResultVariantChangeResultDetails[0]);
+ }
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResult setUser(UserResultDetails user)
+ {
+ this.user = user;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java
new file mode 100644
index 00000000..9f7a7e67
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultSettings.java
@@ -0,0 +1,50 @@
+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 VariantChangeTriggerResultSettings
+{
+ public SelectedProductPropertiesSettings selectedProductProperties;
+ public SelectedVariantPropertiesSettings selectedVariantProperties;
+ public static VariantChangeTriggerResultSettings create()
+ {
+ return new VariantChangeTriggerResultSettings();
+ }
+ public VariantChangeTriggerResultSettings()
+ {
+ }
+ public SelectedProductPropertiesSettings getSelectedProductProperties()
+ {
+ return this.selectedProductProperties;
+ }
+ public SelectedVariantPropertiesSettings getSelectedVariantProperties()
+ {
+ return this.selectedVariantProperties;
+ }
+ public VariantChangeTriggerResultSettings setSelectedProductProperties(SelectedProductPropertiesSettings selectedProductProperties)
+ {
+ this.selectedProductProperties = selectedProductProperties;
+ return this;
+ }
+ public VariantChangeTriggerResultSettings setSelectedVariantProperties(SelectedVariantPropertiesSettings selectedVariantProperties)
+ {
+ this.selectedVariantProperties = selectedVariantProperties;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultTriggerConfiguration.java
new file mode 100644
index 00000000..4f051c73
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultTriggerConfiguration.java
@@ -0,0 +1,111 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class VariantChangeTriggerResultTriggerConfiguration extends TriggerConfiguration
+{
+ public String $type = "";
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public VariantChangeTriggerResultTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetails.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetails.java
new file mode 100644
index 00000000..754a7c0a
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetails.java
@@ -0,0 +1,88 @@
+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 VariantChangeTriggerResultVariantChangeResultDetails
+{
+ public OffsetDateTime changeTime;
+ public DataValue oldValue;
+ public DataValue newValue;
+ public ProductResultDetails product;
+ public VariantResultDetails variant;
+ public static VariantChangeTriggerResultVariantChangeResultDetails create(OffsetDateTime changeTime, DataValue oldValue, DataValue newValue, ProductResultDetails product, VariantResultDetails variant)
+ {
+ return new VariantChangeTriggerResultVariantChangeResultDetails(changeTime, oldValue, newValue, product, variant);
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails(OffsetDateTime changeTime, DataValue oldValue, DataValue newValue, ProductResultDetails product, VariantResultDetails variant)
+ {
+ this.changeTime = changeTime;
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ this.product = product;
+ this.variant = variant;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails()
+ {
+ }
+ public OffsetDateTime getChangeTime()
+ {
+ return this.changeTime;
+ }
+ public DataValue getOldValue()
+ {
+ return this.oldValue;
+ }
+ public DataValue getNewValue()
+ {
+ return this.newValue;
+ }
+ public ProductResultDetails getProduct()
+ {
+ return this.product;
+ }
+ public VariantResultDetails getVariant()
+ {
+ return this.variant;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails setChangeTime(OffsetDateTime changeTime)
+ {
+ this.changeTime = changeTime;
+ return this;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails setOldValue(DataValue oldValue)
+ {
+ this.oldValue = oldValue;
+ return this;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails setNewValue(DataValue newValue)
+ {
+ this.newValue = newValue;
+ return this;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails setProduct(ProductResultDetails product)
+ {
+ this.product = product;
+ return this;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetails setVariant(VariantResultDetails variant)
+ {
+ this.variant = variant;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult.java
new file mode 100644
index 00000000..8ba7882e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult.java
@@ -0,0 +1,46 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult extends EntityChangeTriggerResult implements ITriggerResult
+{
+ public String $type = "";
+ public VariantChangeTriggerResultVariantChangeResultDetails[] entitiesWithChanges;
+ public VariantChangeTriggerResultVariantChangeResultDetails[] getEntitiesWithChanges()
+ {
+ return this.entitiesWithChanges;
+ }
+ public VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult setEntitiesWithChanges(VariantChangeTriggerResultVariantChangeResultDetails... entitiesWithChanges)
+ {
+ this.entitiesWithChanges = entitiesWithChanges;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeResultDetailsEntityChangeTriggerResult setUser(UserResultDetails user)
+ {
+ this.user = user;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration.java b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration.java
new file mode 100644
index 00000000..45ac20f7
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration.java
@@ -0,0 +1,176 @@
+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")
+@JsonSubTypes({
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration extends VariantChangeTriggerResultTriggerConfiguration
+{
+ public String $type = "";
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable VariantPropertySelector entityPropertySelector;
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection beforeChangeFilters;
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection afterChangeFilters;
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange change;
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable VariantChangeTriggerResultSettings resultSettings;
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public @Nullable VariantPropertySelector getEntityPropertySelector()
+ {
+ return this.entityPropertySelector;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public FilterCollection getBeforeChangeFilters()
+ {
+ return this.beforeChangeFilters;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public FilterCollection getAfterChangeFilters()
+ {
+ return this.afterChangeFilters;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public IChange getChange()
+ {
+ return this.change;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public @Nullable VariantChangeTriggerResultSettings getResultSettings()
+ {
+ return this.resultSettings;
+ }
+ /** The selector used for choosing which property of the entity the trigger should look for change in. */
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setEntityPropertySelector(VariantPropertySelector entityPropertySelector)
+ {
+ this.entityPropertySelector = entityPropertySelector;
+ return this;
+ }
+ /** The filter that specifies which entities the trigger should track changes for. */
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setBeforeChangeFilters(FilterCollection beforeChangeFilters)
+ {
+ this.beforeChangeFilters = beforeChangeFilters;
+ return this;
+ }
+ /** The filter for what state the tracked entities should have once they have changed to be included in the results. */
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setAfterChangeFilters(FilterCollection afterChangeFilters)
+ {
+ this.afterChangeFilters = afterChangeFilters;
+ return this;
+ }
+ /** The type of change that should happen to the value selected by the EntityPropertySelector
for an entity to be considered part of the results. */
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setChange(IChange change)
+ {
+ this.change = change;
+ return this;
+ }
+ /** Settings for defining which properties should be included in the result of the trigger. */
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setResultSettings(VariantChangeTriggerResultSettings resultSettings)
+ {
+ this.resultSettings = resultSettings;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setId(UUID id)
+ {
+ this.id = id;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setName(String name)
+ {
+ this.name = name;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setDescription(String description)
+ {
+ this.description = description;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setGroup(String group)
+ {
+ this.group = group;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setCreated(OffsetDateTime created)
+ {
+ this.created = created;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setCreatedBy(String createdBy)
+ {
+ this.createdBy = createdBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setModified(OffsetDateTime modified)
+ {
+ this.modified = modified;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setModifiedBy(String modifiedBy)
+ {
+ this.modifiedBy = modifiedBy;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setWithinTimeSpanMinutes(Integer withinTimeSpanMinutes)
+ {
+ this.withinTimeSpanMinutes = withinTimeSpanMinutes;
+ return this;
+ }
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration addToSettings(String key, String value)
+ {
+ if (this.settings == null)
+ {
+ this.settings = new HashMap<>();
+ }
+ this.settings.put(key, value);
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setSettings(HashMap settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+ @Override
+ public VariantChangeTriggerResultVariantChangeTriggerResultSettingsVariantPropertySelectorEntityChangeTriggerConfiguration setUserConditions(UserConditionCollection userConditions)
+ {
+ this.userConditions = userConditions;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantDataFilter.java b/src/src/main/java/com/relewise/client/model/VariantDataFilter.java
index b7c99063..a67f9bad 100644
--- a/src/src/main/java/com/relewise/client/model/VariantDataFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantDataFilter.java
@@ -150,4 +150,10 @@ public VariantDataFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantDataFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantDataHasKeyFilter.java b/src/src/main/java/com/relewise/client/model/VariantDataHasKeyFilter.java
new file mode 100644
index 00000000..169f4d13
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantDataHasKeyFilter.java
@@ -0,0 +1,73 @@
+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 = VariantDataHasKeyFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VariantDataHasKeyFilter extends Filter implements IVariantFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.VariantDataHasKeyFilter, Relewise.Client";
+ public String key;
+ public static VariantDataHasKeyFilter create(String key)
+ {
+ return new VariantDataHasKeyFilter(key);
+ }
+ public VariantDataHasKeyFilter(String key)
+ {
+ this.key = key;
+ this.negated = false;
+ }
+ public static VariantDataHasKeyFilter create(String key, Boolean negated)
+ {
+ return new VariantDataHasKeyFilter(key, negated);
+ }
+ public VariantDataHasKeyFilter(String key, Boolean negated)
+ {
+ this.key = key;
+ this.negated = negated;
+ }
+ public VariantDataHasKeyFilter()
+ {
+ this.negated = false;
+ }
+ public String getKey()
+ {
+ return this.key;
+ }
+ public VariantDataHasKeyFilter setKey(String key)
+ {
+ this.key = key;
+ return this;
+ }
+ @Override
+ public VariantDataHasKeyFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public VariantDataHasKeyFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ 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 7e51e7d4..2322edac 100644
--- a/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java
@@ -17,22 +17,16 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a variant depending on matching conditions on a certain key. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "$type",
defaultImpl = VariantDataRelevanceModifier.class)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class VariantDataRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
+public class VariantDataRelevanceModifier extends DataRelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantDataRelevanceModifier, Relewise.Client";
- public String key;
- public Boolean considerAsMatchIfKeyIsNotFound;
- /** @deprecated Use MultiplierSelector instead */
- public Double multiplyWeightBy;
- public Boolean mustMatchAllConditions;
- public ArrayList conditions;
- public ValueSelector multiplierSelector;
public static VariantDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector)
{
return new VariantDataRelevanceModifier(key, conditions, multiplierSelector);
@@ -45,10 +39,20 @@ public VariantDataRelevanceModifier(String key, ArrayList condit
this.mustMatchAllConditions = true;
this.considerAsMatchIfKeyIsNotFound = false;
}
+ /**
+ * 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).
+ */
public static VariantDataRelevanceModifier create(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
{
return new VariantDataRelevanceModifier(key, conditions, multiplierSelector, mustMatchAllConditions, considerAsMatchIfKeyIsNotFound);
}
+ /**
+ * 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).
+ */
public VariantDataRelevanceModifier(String key, ArrayList conditions, ValueSelector multiplierSelector, Boolean mustMatchAllConditions, Boolean considerAsMatchIfKeyIsNotFound)
{
this.key = key;
@@ -62,52 +66,32 @@ public VariantDataRelevanceModifier()
this.considerAsMatchIfKeyIsNotFound = false;
this.mustMatchAllConditions = true;
}
- public String getKey()
- {
- return this.key;
- }
- public Boolean getConsiderAsMatchIfKeyIsNotFound()
- {
- return this.considerAsMatchIfKeyIsNotFound;
- }
- /** @deprecated Use MultiplierSelector instead */
- public Double getMultiplyWeightBy()
- {
- return this.multiplyWeightBy;
- }
- public Boolean getMustMatchAllConditions()
- {
- return this.mustMatchAllConditions;
- }
- public ArrayList getConditions()
- {
- return this.conditions;
- }
- public ValueSelector getMultiplierSelector()
- {
- return this.multiplierSelector;
- }
+ @Override
public VariantDataRelevanceModifier setKey(String key)
{
this.key = key;
return this;
}
+ @Override
public VariantDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean considerAsMatchIfKeyIsNotFound)
{
this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound;
return this;
}
/** @deprecated Use MultiplierSelector instead */
+ @Override
public VariantDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ @Override
public VariantDataRelevanceModifier setMustMatchAllConditions(Boolean mustMatchAllConditions)
{
this.mustMatchAllConditions = mustMatchAllConditions;
return this;
}
+ @Override
public VariantDataRelevanceModifier setConditions(ValueCondition... conditions)
{
this.conditions = new ArrayList<>(Arrays.asList(conditions));;
@@ -122,6 +106,7 @@ public VariantDataRelevanceModifier addToConditions(ValueCondition conditions)
this.conditions.add(conditions);
return this;
}
+ @Override
public VariantDataRelevanceModifier setMultiplierSelector(ValueSelector multiplierSelector)
{
this.multiplierSelector = multiplierSelector;
diff --git a/src/src/main/java/com/relewise/client/model/VariantDisabledFilter.java b/src/src/main/java/com/relewise/client/model/VariantDisabledFilter.java
new file mode 100644
index 00000000..f0dbaa53
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantDisabledFilter.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;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = VariantDisabledFilter.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VariantDisabledFilter extends Filter implements IVariantFilter
+{
+ public String $type = "Relewise.Client.Requests.Filters.VariantDisabledFilter, Relewise.Client";
+ public static VariantDisabledFilter create()
+ {
+ return new VariantDisabledFilter();
+ }
+ public VariantDisabledFilter()
+ {
+ this.negated = false;
+ }
+ public static VariantDisabledFilter create(Boolean negated)
+ {
+ return new VariantDisabledFilter(negated);
+ }
+ public VariantDisabledFilter(Boolean negated)
+ {
+ this.negated = negated;
+ }
+ @Override
+ public VariantDisabledFilter setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public VariantDisabledFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantIdFilter.java b/src/src/main/java/com/relewise/client/model/VariantIdFilter.java
index df360859..e50cc287 100644
--- a/src/src/main/java/com/relewise/client/model/VariantIdFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantIdFilter.java
@@ -67,4 +67,10 @@ public VariantIdFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantIdFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantIdRelevanceModifier.java
new file mode 100644
index 00000000..379d0c5d
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantIdRelevanceModifier.java
@@ -0,0 +1,108 @@
+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 RelevanceModifier
that can change the relevance of a Variant depending on whether it is contained in a set of VariantIds
. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.EXISTING_PROPERTY,
+ property = "$type",
+ defaultImpl = VariantIdRelevanceModifier.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VariantIdRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
+{
+ public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantIdRelevanceModifier, Relewise.Client";
+ /** The Ids of the Variants that this RelevanceModifier
will distinguish on. */
+ public String[] variantIds;
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
+ public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that don't match one of the specified VariantIds
instead. */
+ public Boolean negated;
+ public static VariantIdRelevanceModifier create()
+ {
+ return new VariantIdRelevanceModifier();
+ }
+ public VariantIdRelevanceModifier()
+ {
+ this.multiplyWeightBy = 1d;
+ this.negated = false;
+ }
+ public static VariantIdRelevanceModifier create(Double multiplyWeightBy, Boolean negated)
+ {
+ return new VariantIdRelevanceModifier(multiplyWeightBy, negated);
+ }
+ public VariantIdRelevanceModifier(Double multiplyWeightBy, Boolean negated)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ this.negated = negated;
+ }
+ /** The Ids of the Variants that this RelevanceModifier
will distinguish on. */
+ public String[] getVariantIds()
+ {
+ return this.variantIds;
+ }
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
+ public Double getMultiplyWeightBy()
+ {
+ return this.multiplyWeightBy;
+ }
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that don't match one of the specified VariantIds
instead. */
+ public Boolean getNegated()
+ {
+ return this.negated;
+ }
+ /** The Ids of the Variants that this RelevanceModifier
will distinguish on. */
+ public VariantIdRelevanceModifier setVariantIds(String... variantIds)
+ {
+ this.variantIds = variantIds;
+ return this;
+ }
+ /** The Ids of the Variants that this RelevanceModifier
will distinguish on. */
+ public VariantIdRelevanceModifier addToVariantIds(String variantId)
+ {
+ if (this.variantIds == null)
+ {
+ this.variantIds = new String[] { variantId };
+ }
+ else
+ {
+ ArrayList existingList = new ArrayList<>(Arrays.asList(this.variantIds));
+ existingList.add(variantId);
+ this.variantIds = existingList.toArray(new String[0]);
+ }
+ return this;
+ }
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
+ public VariantIdRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
+ {
+ this.multiplyWeightBy = multiplyWeightBy;
+ return this;
+ }
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that don't match one of the specified VariantIds
instead. */
+ public VariantIdRelevanceModifier setNegated(Boolean negated)
+ {
+ this.negated = negated;
+ return this;
+ }
+ @Override
+ public VariantIdRelevanceModifier setFilters(FilterCollection filters)
+ {
+ this.filters = filters;
+ return this;
+ }
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantListPriceFilter.java b/src/src/main/java/com/relewise/client/model/VariantListPriceFilter.java
index 39a610a9..48db2713 100644
--- a/src/src/main/java/com/relewise/client/model/VariantListPriceFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantListPriceFilter.java
@@ -77,4 +77,10 @@ public VariantListPriceFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantListPriceFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java
index 2602a4b9..94a54367 100644
--- a/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Variant depending on the list price falling within a specific Range
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class VariantListPriceRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantListPriceRelevanceModifier, Relewise.Client";
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public DoubleRange range;
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency currency;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that aren't contained within the specific Range
instead. */
public Boolean negated;
public static VariantListPriceRelevanceModifier create(DoubleRange range)
{
@@ -41,12 +46,24 @@ public VariantListPriceRelevanceModifier(DoubleRange range)
this.currency = null;
this.negated = false;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on the list price falling within a specific Range
.
+ * @param range The range of list prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Variants that aren't contained within the specific Range instead.
+ */
public static VariantListPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
return new VariantListPriceRelevanceModifier(range, multiplyWeightBy, currency, negated);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on the list price falling within a specific Range
.
+ * @param range The range of list prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Variants that aren't contained within the specific Range instead.
+ */
public VariantListPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
this.range = range;
@@ -60,37 +77,45 @@ public VariantListPriceRelevanceModifier()
this.multiplyWeightBy = 1d;
this.negated = false;
}
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public DoubleRange getRange()
{
return this.range;
}
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency getCurrency()
{
return this.currency;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that aren't contained within the specific Range
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The range of list prices that this RelevanceModifier
will distinguish on. */
public VariantListPriceRelevanceModifier setRange(DoubleRange range)
{
this.range = range;
return this;
}
+ /** The currency that is used to distinguish the price. */
public VariantListPriceRelevanceModifier setCurrency(Currency currency)
{
this.currency = currency;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public VariantListPriceRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Variants that aren't contained within the specific Range
instead. */
public VariantListPriceRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/VariantPropertySelector.java b/src/src/main/java/com/relewise/client/model/VariantPropertySelector.java
new file mode 100644
index 00000000..8c9e995e
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/VariantPropertySelector.java
@@ -0,0 +1,32 @@
+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")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = ObservableVariantAttributeSelector.class, name = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableVariantAttributeSelector, Relewise.Client"),
+ @JsonSubTypes.Type(value = ObservableVariantDataValueSelector.class, name = "Relewise.Client.DataTypes.EntityPropertySelectors.ObservableVariantDataValueSelector, Relewise.Client"),
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class VariantPropertySelector
+{
+ public String $type = "";
+}
diff --git a/src/src/main/java/com/relewise/client/model/VariantSalesPriceFilter.java b/src/src/main/java/com/relewise/client/model/VariantSalesPriceFilter.java
index 41f5a89e..6085d320 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSalesPriceFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSalesPriceFilter.java
@@ -77,4 +77,10 @@ public VariantSalesPriceFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantSalesPriceFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java
index 0be13c6a..65abf5ff 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Variant depending on the sales price falling within a specific Range
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,9 +27,13 @@
public class VariantSalesPriceRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantSalesPriceRelevanceModifier, Relewise.Client";
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public DoubleRange range;
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency currency;
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double multiplyWeightBy;
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean negated;
public static VariantSalesPriceRelevanceModifier create(DoubleRange range)
{
@@ -41,12 +46,24 @@ public VariantSalesPriceRelevanceModifier(DoubleRange range)
this.currency = null;
this.negated = false;
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on the sales price falling within a specific Range
.
+ * @param range The range of sales prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public static VariantSalesPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
return new VariantSalesPriceRelevanceModifier(range, multiplyWeightBy, currency, negated);
}
- /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on the sales price falling within a specific Range
.
+ * @param range The range of sales prices that this RelevanceModifier will distinguish on.
+ * @param multiplyWeightBy The weight that this RelevanceModifier will multiply relevant products with.
+ * @param currency The currency that is used to distinguish the price.
+ * @param negated Determines whether this RelevanceModifier should apply to all the Products that aren't contained within the specific Range instead.
+ */
public VariantSalesPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated)
{
this.range = range;
@@ -60,37 +77,45 @@ public VariantSalesPriceRelevanceModifier()
this.multiplyWeightBy = 1d;
this.negated = false;
}
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public DoubleRange getRange()
{
return this.range;
}
+ /** The currency that is used to distinguish the price. */
public @Nullable Currency getCurrency()
{
return this.currency;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public Boolean getNegated()
{
return this.negated;
}
+ /** The range of sales prices that this RelevanceModifier
will distinguish on. */
public VariantSalesPriceRelevanceModifier setRange(DoubleRange range)
{
this.range = range;
return this;
}
+ /** The currency that is used to distinguish the price. */
public VariantSalesPriceRelevanceModifier setCurrency(Currency currency)
{
this.currency = currency;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant products with. */
public VariantSalesPriceRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy)
{
this.multiplyWeightBy = multiplyWeightBy;
return this;
}
+ /** Determines whether this RelevanceModifier
should apply to all the Products that aren't contained within the specific Range
instead. */
public VariantSalesPriceRelevanceModifier setNegated(Boolean negated)
{
this.negated = negated;
diff --git a/src/src/main/java/com/relewise/client/model/VariantSearchSettings.java b/src/src/main/java/com/relewise/client/model/VariantSearchSettings.java
index 1d814f9e..bd6fa13b 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSearchSettings.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSearchSettings.java
@@ -20,6 +20,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class VariantSearchSettings
{
+ /** @deprecated Use ProductSearchSettings.ResultConstraint instead */
public Boolean excludeResultsWithoutVariant;
public static VariantSearchSettings create()
{
@@ -28,10 +29,12 @@ public static VariantSearchSettings create()
public VariantSearchSettings()
{
}
+ /** @deprecated Use ProductSearchSettings.ResultConstraint instead */
public Boolean getExcludeResultsWithoutVariant()
{
return this.excludeResultsWithoutVariant;
}
+ /** @deprecated Use ProductSearchSettings.ResultConstraint instead */
public VariantSearchSettings setExcludeResultsWithoutVariant(Boolean excludeResultsWithoutVariant)
{
this.excludeResultsWithoutVariant = excludeResultsWithoutVariant;
diff --git a/src/src/main/java/com/relewise/client/model/VariantSpecificationFilter.java b/src/src/main/java/com/relewise/client/model/VariantSpecificationFilter.java
index 50c4a38a..3e2e0756 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSpecificationFilter.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSpecificationFilter.java
@@ -86,4 +86,10 @@ public VariantSpecificationFilter setNegated(Boolean negated)
this.negated = negated;
return this;
}
+ @Override
+ public VariantSpecificationFilter setSettings(FilterSettings settings)
+ {
+ this.settings = settings;
+ return this;
+ }
}
diff --git a/src/src/main/java/com/relewise/client/model/VariantSpecificationValueRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantSpecificationValueRelevanceModifier.java
index 9fab73b5..6dcdb8bf 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSpecificationValueRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSpecificationValueRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Variant depending on whether a certain specification Key
has a certain Value
. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,10 +27,15 @@
public class VariantSpecificationValueRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantSpecificationValueRelevanceModifier, Relewise.Client";
+ /** The specification key that this RelevanceModifier
will distinguish on. */
public String key;
+ /** The value that the key must be equal. */
public String value;
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public Double ifIdenticalMultiplyWeightBy;
+ /** The weight that this RelevanceModifier
will multiply variants that are note relevant with. */
public Double ifNotIdenticalMultiplyWeightBy;
+ /** Determines whether specification keys that are not found should count as the value not being equal i.e. multiplying by IfNotIdenticalMultiplyWeightBy
. Alternatively the rank will not be modified in any way by this modifier. */
public Boolean ifSpecificationKeyNotFoundApplyNotEqualMultiplier;
public static VariantSpecificationValueRelevanceModifier create(String key, String value)
{
@@ -43,10 +49,26 @@ public VariantSpecificationValueRelevanceModifier(String key, String value)
this.ifNotIdenticalMultiplyWeightBy = 0d;
this.ifSpecificationKeyNotFoundApplyNotEqualMultiplier = false;
}
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on whether a certain specification Key
has a certain Value
.
+ * @param key The specification key that this RelevanceModifier will distinguish on.
+ * @param value The value that the key must be equal.
+ * @param ifIdenticalMultiplyWeightBy The weight that this RelevanceModifier will multiply relevant variants with.
+ * @param ifNotIdenticalMultiplyWeightBy The weight that this RelevanceModifier will multiply variants that are note relevant with.
+ * @param ifSpecificationKeyNotFoundApplyNotEqualMultiplier Determines whether specification keys that are not found should count as the value not being equal i.e. multiplying by IfNotIdenticalMultiplyWeightBy. Alternatively the rank will not be modified in any way by this modifier.
+ */
public static VariantSpecificationValueRelevanceModifier create(String key, String value, Double ifIdenticalMultiplyWeightBy, Double ifNotIdenticalMultiplyWeightBy, Boolean ifSpecificationKeyNotFoundApplyNotEqualMultiplier)
{
return new VariantSpecificationValueRelevanceModifier(key, value, ifIdenticalMultiplyWeightBy, ifNotIdenticalMultiplyWeightBy, ifSpecificationKeyNotFoundApplyNotEqualMultiplier);
}
+ /**
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on whether a certain specification Key
has a certain Value
.
+ * @param key The specification key that this RelevanceModifier will distinguish on.
+ * @param value The value that the key must be equal.
+ * @param ifIdenticalMultiplyWeightBy The weight that this RelevanceModifier will multiply relevant variants with.
+ * @param ifNotIdenticalMultiplyWeightBy The weight that this RelevanceModifier will multiply variants that are note relevant with.
+ * @param ifSpecificationKeyNotFoundApplyNotEqualMultiplier Determines whether specification keys that are not found should count as the value not being equal i.e. multiplying by IfNotIdenticalMultiplyWeightBy. Alternatively the rank will not be modified in any way by this modifier.
+ */
public VariantSpecificationValueRelevanceModifier(String key, String value, Double ifIdenticalMultiplyWeightBy, Double ifNotIdenticalMultiplyWeightBy, Boolean ifSpecificationKeyNotFoundApplyNotEqualMultiplier)
{
this.key = key;
@@ -61,46 +83,56 @@ public VariantSpecificationValueRelevanceModifier()
this.ifNotIdenticalMultiplyWeightBy = 0d;
this.ifSpecificationKeyNotFoundApplyNotEqualMultiplier = false;
}
+ /** The specification key that this RelevanceModifier
will distinguish on. */
public String getKey()
{
return this.key;
}
+ /** The value that the key must be equal. */
public String getValue()
{
return this.value;
}
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public Double getIfIdenticalMultiplyWeightBy()
{
return this.ifIdenticalMultiplyWeightBy;
}
+ /** The weight that this RelevanceModifier
will multiply variants that are note relevant with. */
public Double getIfNotIdenticalMultiplyWeightBy()
{
return this.ifNotIdenticalMultiplyWeightBy;
}
+ /** Determines whether specification keys that are not found should count as the value not being equal i.e. multiplying by IfNotIdenticalMultiplyWeightBy
. Alternatively the rank will not be modified in any way by this modifier. */
public Boolean getIfSpecificationKeyNotFoundApplyNotEqualMultiplier()
{
return this.ifSpecificationKeyNotFoundApplyNotEqualMultiplier;
}
+ /** The specification key that this RelevanceModifier
will distinguish on. */
public VariantSpecificationValueRelevanceModifier setKey(String key)
{
this.key = key;
return this;
}
+ /** The value that the key must be equal. */
public VariantSpecificationValueRelevanceModifier setValue(String value)
{
this.value = value;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply relevant variants with. */
public VariantSpecificationValueRelevanceModifier setIfIdenticalMultiplyWeightBy(Double ifIdenticalMultiplyWeightBy)
{
this.ifIdenticalMultiplyWeightBy = ifIdenticalMultiplyWeightBy;
return this;
}
+ /** The weight that this RelevanceModifier
will multiply variants that are note relevant with. */
public VariantSpecificationValueRelevanceModifier setIfNotIdenticalMultiplyWeightBy(Double ifNotIdenticalMultiplyWeightBy)
{
this.ifNotIdenticalMultiplyWeightBy = ifNotIdenticalMultiplyWeightBy;
return this;
}
+ /** Determines whether specification keys that are not found should count as the value not being equal i.e. multiplying by IfNotIdenticalMultiplyWeightBy
. Alternatively the rank will not be modified in any way by this modifier. */
public VariantSpecificationValueRelevanceModifier setIfSpecificationKeyNotFoundApplyNotEqualMultiplier(Boolean ifSpecificationKeyNotFoundApplyNotEqualMultiplier)
{
this.ifSpecificationKeyNotFoundApplyNotEqualMultiplier = ifSpecificationKeyNotFoundApplyNotEqualMultiplier;
diff --git a/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java
index e9056770..f42329bf 100644
--- a/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java
+++ b/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java
@@ -17,6 +17,7 @@
import java.util.Set;
import java.util.HashSet;
+/** a RelevanceModifier
that can change the relevance of a Variant depending on whether certain SpecificationKeysAndMultipliers
match with a specific variant. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
@@ -26,18 +27,19 @@
public class VariantSpecificationsInCommonRelevanceModifier extends RelevanceModifier implements IVariantRelevanceModifier
{
public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantSpecificationsInCommonRelevanceModifier, Relewise.Client";
+ /** A collection of KeyMultiplier
that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0. */
public KeyMultiplier[] specificationKeysAndMultipliers;
/**
- * The default multiplier for keys not included, is 1.0
- * @param specificationKeysAndMultipliers
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on whether certain SpecificationKeysAndMultipliers
match with a specific variant.
+ * @param specificationKeysAndMultipliers A collection of KeyMultiplier that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0.
*/
public static VariantSpecificationsInCommonRelevanceModifier create(KeyMultiplier... specificationKeysAndMultipliers)
{
return new VariantSpecificationsInCommonRelevanceModifier(specificationKeysAndMultipliers);
}
/**
- * The default multiplier for keys not included, is 1.0
- * @param specificationKeysAndMultipliers
+ * Creates a RelevanceModifier
that can change the relevance of a Variant depending on whether certain SpecificationKeysAndMultipliers
match with a specific variant.
+ * @param specificationKeysAndMultipliers A collection of KeyMultiplier that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0.
*/
public VariantSpecificationsInCommonRelevanceModifier(KeyMultiplier... specificationKeysAndMultipliers)
{
@@ -46,15 +48,18 @@ public VariantSpecificationsInCommonRelevanceModifier(KeyMultiplier... specifica
public VariantSpecificationsInCommonRelevanceModifier()
{
}
+ /** A collection of KeyMultiplier
that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0. */
public KeyMultiplier[] getSpecificationKeysAndMultipliers()
{
return this.specificationKeysAndMultipliers;
}
+ /** A collection of KeyMultiplier
that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0. */
public VariantSpecificationsInCommonRelevanceModifier setSpecificationKeysAndMultipliers(KeyMultiplier... specificationKeysAndMultipliers)
{
this.specificationKeysAndMultipliers = specificationKeysAndMultipliers;
return this;
}
+ /** A collection of KeyMultiplier
that each define a certain key and value that the relevance should be multiplied with if matching on this key. The default multiplier for keys not included, is 1.0. */
public VariantSpecificationsInCommonRelevanceModifier addToSpecificationKeysAndMultipliers(KeyMultiplier specificationKeysAndMultiplier)
{
if (this.specificationKeysAndMultipliers == null)
diff --git a/src/src/main/java/com/relewise/client/model/ViewedByUserCompanyInfo.java b/src/src/main/java/com/relewise/client/model/ViewedByUserCompanyInfo.java
new file mode 100644
index 00000000..8b557934
--- /dev/null
+++ b/src/src/main/java/com/relewise/client/model/ViewedByUserCompanyInfo.java
@@ -0,0 +1,65 @@
+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 ViewedByUserCompanyInfo
+{
+ public OffsetDateTime mostRecentlyViewedUtc;
+ public Long totalNumberOfTimesViewed;
+ public ViewedByUserCompanyInfo viewedByParentCompany;
+ public static ViewedByUserCompanyInfo create(OffsetDateTime mostRecentlyViewedUtc, Long totalNumberOfTimesViewed)
+ {
+ return new ViewedByUserCompanyInfo(mostRecentlyViewedUtc, totalNumberOfTimesViewed);
+ }
+ public ViewedByUserCompanyInfo(OffsetDateTime mostRecentlyViewedUtc, Long totalNumberOfTimesViewed)
+ {
+ this.mostRecentlyViewedUtc = mostRecentlyViewedUtc;
+ this.totalNumberOfTimesViewed = totalNumberOfTimesViewed;
+ }
+ public ViewedByUserCompanyInfo()
+ {
+ }
+ public OffsetDateTime getMostRecentlyViewedUtc()
+ {
+ return this.mostRecentlyViewedUtc;
+ }
+ public Long getTotalNumberOfTimesViewed()
+ {
+ return this.totalNumberOfTimesViewed;
+ }
+ public ViewedByUserCompanyInfo getViewedByParentCompany()
+ {
+ return this.viewedByParentCompany;
+ }
+ public ViewedByUserCompanyInfo setMostRecentlyViewedUtc(OffsetDateTime mostRecentlyViewedUtc)
+ {
+ this.mostRecentlyViewedUtc = mostRecentlyViewedUtc;
+ return this;
+ }
+ public ViewedByUserCompanyInfo setTotalNumberOfTimesViewed(Long totalNumberOfTimesViewed)
+ {
+ this.totalNumberOfTimesViewed = totalNumberOfTimesViewed;
+ return this;
+ }
+ public ViewedByUserCompanyInfo setViewedByParentCompany(ViewedByUserCompanyInfo viewedByParentCompany)
+ {
+ this.viewedByParentCompany = viewedByParentCompany;
+ return this;
+ }
+}
diff --git a/src/src/test/java/com/relewise/client/GeneratedRequestsTest.java b/src/src/test/java/com/relewise/client/GeneratedRequestsTest.java
index 9be39257..dba35e1a 100644
--- a/src/src/test/java/com/relewise/client/GeneratedRequestsTest.java
+++ b/src/src/test/java/com/relewise/client/GeneratedRequestsTest.java
@@ -15,10 +15,10 @@ public void testTrackOrderRequestWithBuilderPatternAndCreatorMethod() throws Exc
var orderRequest = TrackOrderRequest.create(
Order.create(
- UserFactory.byTemporaryId("t-id"),
+ UserFactory.byTemporaryId("t-id").setChannel(Channel.create("Channel 1")),
Money.create(Currency.create("DKK"), 100.0),
"1"
- ).setChannel("Channel 1")
+ )
);
Executable action = () -> tracker.track(orderRequest);
@@ -36,7 +36,7 @@ public void testTrackOrderRequestWithBuilderPattern() throws Exception {
var orderRequest = (new TrackOrderRequest())
.setOrder((new Order())
- .setUser(new User().setTemporaryId("t-Id"))
+ .setUser(new User().setTemporaryId("t-Id").setChannel(Channel.create("Channel 1")))
.setSubtotal((new Money())
.setAmount(100.0)
.setCurrency((new Currency())
@@ -45,7 +45,6 @@ public void testTrackOrderRequestWithBuilderPattern() throws Exception {
)
.setOrderNumber("1")
.setCartName("1")
- .setChannel("Channel 1")
);
Executable action = () -> tracker.track(orderRequest);
@@ -62,14 +61,13 @@ public void testTrackOrderRequest() throws Exception {
var tracker = new Tracker(GetDatasetId(), GetApiKey(), "https://api.relewise.com");
var order = new Order(
- UserFactory.byTemporaryId("t-ID"),
+ UserFactory.byTemporaryId("t-ID").setChannel(Channel.create("Channel 1")),
new Money(
new Currency("DKK"),
100.0
),
"1"
);
- order.setChannel("Channel 1");
var orderRequest = new TrackOrderRequest(order);
diff --git a/src/src/test/java/com/relewise/client/SearcherTest.java b/src/src/test/java/com/relewise/client/SearcherTest.java
index 0c8d0cdb..aec36a88 100644
--- a/src/src/test/java/com/relewise/client/SearcherTest.java
+++ b/src/src/test/java/com/relewise/client/SearcherTest.java
@@ -58,6 +58,13 @@ public void testProductSearchWithRecentlyViewedFilter() throws Exception {
).setFilters(
FilterCollection.create(
ProductRecentlyViewedByUserFilter.create(OffsetDateTime.now().minusDays(365))
+ .setSettings(
+ FilterSettings.create()
+ .setScopes(
+ FilterScopes.create()
+ .setDefault(ApplyFilterSettings.create(true))
+ )
+ )
)
);