diff --git a/changes.md b/changes.md index a0b1a26ab9a..fa3310660ea 100644 --- a/changes.md +++ b/changes.md @@ -1,431 +1,10 @@ **Api changes** -
-Added Enum(s) - -- added enum `RecurringOrder` to type `CartOrigin` -- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` -- added enum `discount-group` to type `ReferenceTypeId` -- added enum `payment-method` to type `ReferenceTypeId` -- added enum `recurrence-policy` to type `ReferenceTypeId` -- added enum `recurring-order` to type `ReferenceTypeId` -- added enum `payment-method` to type `ExtensionResourceTypeId` -- added enum `RecurringOrderState` to type `StateTypeEnum` -- added enum `recurrence-policy` to type `ChangeSubscriptionResourceTypeId` -- added enum `recurring-order` to type `ChangeSubscriptionResourceTypeId` -- added enum `recurring-order` to type `ResourceTypeId` -
- - -
-Added Property(s) - -- added property `makeInheritedAssociatesExplicit` to type `BusinessUnitChangeAssociateModeAction` -- added property `discountGroup` to type `CartDiscount` -- added property `discountGroup` to type `CartDiscountDraft` -- added property `priceRoundingMode` to type `Cart` -- added property `priceRoundingMode` to type `CartDraft` -- added property `recurrenceInfo` to type `CustomLineItem` -- added property `recurrenceInfo` to type `CustomLineItemDraft` -- added property `recurrenceInfo` to type `LineItem` -- added property `recurrenceInfo` to type `LineItemDraft` -- added property `recurrenceInfo` to type `CartAddCustomLineItemAction` -- added property `recurrenceInfo` to type `CartAddLineItemAction` -- added property `recurrencePolicy` to type `Price` -- added property `recurrencePolicy` to type `PriceDraft` -- added property `recurrenceInfo` to type `MyLineItemDraft` -- added property `recurrenceInfo` to type `MyCartAddLineItemAction` -- added property `attributes` to type `ProductTailoringCreatedMessage` -- added property `attributes` to type `ProductTailoringCreatedMessagePayload` -- added property `priceRoundingMode` to type `StagedOrder` -- added property `recurringOrder` to type `StagedOrder` -- added property `recurrenceInfo` to type `StagedOrderAddCustomLineItemAction` -- added property `recurrenceInfo` to type `StagedOrderAddLineItemAction` -- added property `priceRoundingMode` to type `Order` -- added property `recurringOrder` to type `Order` -- added property `priceRoundingMode` to type `OrderImportDraft` -- added property `token` to type `PaymentMethodInfo` -- added property `interfaceAccount` to type `PaymentMethodInfo` -- added property `custom` to type `PaymentMethodInfo` -- added property `attributes` to type `ProductTailoringData` -- added property `attributes` to type `ProductTailoringDraft` -- added property `attributes` to type `ProductTailoringInStoreDraft` -- added property `level` to type `AttributeDefinition` -- added property `level` to type `AttributeDefinitionDraft` -- added property `attributes` to type `ProductData` -- added property `attributes` to type `ProductDraft` -- added property `attributes` to type `ProductProjection` -- added property `recurrencePrices` to type `ProductVariant` -- added property `priceRoundingMode` to type `CartsConfiguration` -- added property `taxRoundingMode` to type `CartsConfiguration` -- added property `priceRoundingMode` to type `QuoteRequest` -- added property `priceRoundingMode` to type `Quote` -- added property `recurrencePolicy` to type `StandalonePrice` -- added property `recurrencePolicy` to type `StandalonePriceDraft` -- added property `events` to type `SubscriptionSetEventsAction` -
- - -
-Changed Property(s) - -- :warning: changed property `paymentMethodInfo` of type `MyPaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` -- :warning: changed property `paymentMethodInfo` of type `PaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` -
- - -
-Required Property(s) - -- changed property `sortOrder` of type `CartDiscountDraft` to be optional -
- - -
-Removed Property(s) - -- :warning: removed property `messages` from type `SubscriptionSetEventsAction` -
- - -
-Added Method(s) - -- added method `apiRoot.withProjectKey().discountGroups().get()` -- added method `apiRoot.withProjectKey().discountGroups().head()` -- added method `apiRoot.withProjectKey().discountGroups().post()` -- added method `apiRoot.withProjectKey().paymentMethods().get()` -- added method `apiRoot.withProjectKey().paymentMethods().head()` -- added method `apiRoot.withProjectKey().paymentMethods().post()` -- added method `apiRoot.withProjectKey().recurringOrders().get()` -- added method `apiRoot.withProjectKey().recurringOrders().head()` -- added method `apiRoot.withProjectKey().recurringOrders().post()` -- added method `apiRoot.withProjectKey().recurrencePolicies().get()` -- added method `apiRoot.withProjectKey().recurrencePolicies().head()` -- added method `apiRoot.withProjectKey().recurrencePolicies().post()` -- added method `apiRoot.withProjectKey().discountGroups().withKey().get()` -- added method `apiRoot.withProjectKey().discountGroups().withKey().head()` -- added method `apiRoot.withProjectKey().discountGroups().withKey().post()` -- added method `apiRoot.withProjectKey().discountGroups().withKey().delete()` -- added method `apiRoot.withProjectKey().discountGroups().withId().get()` -- added method `apiRoot.withProjectKey().discountGroups().withId().head()` -- added method `apiRoot.withProjectKey().discountGroups().withId().post()` -- added method `apiRoot.withProjectKey().discountGroups().withId().delete()` -- added method `apiRoot.withProjectKey().paymentMethods().withKey().get()` -- added method `apiRoot.withProjectKey().paymentMethods().withKey().head()` -- added method `apiRoot.withProjectKey().paymentMethods().withKey().post()` -- added method `apiRoot.withProjectKey().paymentMethods().withKey().delete()` -- added method `apiRoot.withProjectKey().paymentMethods().withId().get()` -- added method `apiRoot.withProjectKey().paymentMethods().withId().head()` -- added method `apiRoot.withProjectKey().paymentMethods().withId().post()` -- added method `apiRoot.withProjectKey().paymentMethods().withId().delete()` -- added method `apiRoot.withProjectKey().recurringOrders().withId().get()` -- added method `apiRoot.withProjectKey().recurringOrders().withId().head()` -- added method `apiRoot.withProjectKey().recurringOrders().withId().post()` -- added method `apiRoot.withProjectKey().recurringOrders().withKey().get()` -- added method `apiRoot.withProjectKey().recurringOrders().withKey().head()` -- added method `apiRoot.withProjectKey().recurringOrders().withKey().post()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().get()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().head()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().post()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withId().get()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withId().head()` -- added method `apiRoot.withProjectKey().recurrencePolicies().withId().post()` -
- - -
-Added Type(s) - -- added type `CartDiscountSetDiscountGroupAction` -- added type `CartChangePriceRoundingModeAction` -- added type `CartSetCustomLineItemRecurrenceInfoAction` -- added type `CartSetLineItemRecurrenceInfoAction` -- added type `DiscountGroup` -- added type `DiscountGroupDraft` -- added type `DiscountGroupPagedQueryResponse` -- added type `DiscountGroupReference` -- added type `DiscountGroupResourceIdentifier` -- added type `DiscountGroupUpdate` -- added type `DiscountGroupUpdateAction` -- added type `DiscountGroupSetDescriptionAction` -- added type `DiscountGroupSetKeyAction` -- added type `DiscountGroupSetNameAction` -- added type `DiscountGroupSetSortOrderAction` -- added type `MyCartSetCustomLineItemRecurrenceInfoAction` -- added type `MyCartSetLineItemRecurrenceInfoAction` -- added type `MyPaymentSetMethodInfoCustomFieldAction` -- added type `MyPaymentSetMethodInfoCustomTypeAction` -- added type `MyPaymentSetMethodInfoInterfaceAccountAction` -- added type `DiscountGroupCreatedMessage` -- added type `DiscountGroupDeletedMessage` -- added type `DiscountGroupKeySetMessage` -- added type `DiscountGroupSortOrderSetMessage` -- added type `OrderCreatedFromRecurringOrderMessage` -- added type `PaymentInterfaceIdSetMessage` -- added type `PaymentMethodCreatedMessage` -- added type `PaymentMethodCustomFieldAddedMessage` -- added type `PaymentMethodCustomFieldChangedMessage` -- added type `PaymentMethodCustomFieldRemovedMessage` -- added type `PaymentMethodCustomTypeRemovedMessage` -- added type `PaymentMethodCustomTypeSetMessage` -- added type `PaymentMethodDefaultSetMessage` -- added type `PaymentMethodDeletedMessage` -- added type `PaymentMethodInfoCustomFieldAddedMessage` -- added type `PaymentMethodInfoCustomFieldChangedMessage` -- added type `PaymentMethodInfoCustomFieldRemovedMessage` -- added type `PaymentMethodInfoCustomTypeRemovedMessage` -- added type `PaymentMethodInfoCustomTypeSetMessage` -- added type `PaymentMethodInfoInterfaceAccountSetMessage` -- added type `PaymentMethodInfoInterfaceSetMessage` -- added type `PaymentMethodInfoMethodSetMessage` -- added type `PaymentMethodInfoNameSetMessage` -- added type `PaymentMethodInfoTokenSetMessage` -- added type `PaymentMethodInterfaceAccountSetMessage` -- added type `PaymentMethodKeySetMessage` -- added type `PaymentMethodMethodSetMessage` -- added type `PaymentMethodNameSetMessage` -- added type `PaymentMethodPaymentInterfaceSetMessage` -- added type `PaymentMethodPaymentMethodStatusSetMessage` -- added type `RecurringOrderCreatedMessage` -- added type `RecurringOrderCustomFieldAddedMessage` -- added type `RecurringOrderCustomFieldChangedMessage` -- added type `RecurringOrderCustomFieldRemovedMessage` -- added type `RecurringOrderCustomTypeRemovedMessage` -- added type `RecurringOrderCustomTypeSetMessage` -- added type `RecurringOrderKeySetMessage` -- added type `RecurringOrderScheduleSetMessage` -- added type `RecurringOrderStartsAtSetMessage` -- added type `RecurringOrderStateChangedMessage` -- added type `RecurringOrderStateTransitionMessage` -- added type `DiscountGroupCreatedMessagePayload` -- added type `DiscountGroupDeletedMessagePayload` -- added type `DiscountGroupKeySetMessagePayload` -- added type `DiscountGroupSortOrderSetMessagePayload` -- added type `OrderCreatedFromRecurringOrderMessagePayload` -- added type `PaymentInterfaceIdSetMessagePayload` -- added type `PaymentMethodCreatedMessagePayload` -- added type `PaymentMethodCustomFieldAddedMessagePayload` -- added type `PaymentMethodCustomFieldChangedMessagePayload` -- added type `PaymentMethodCustomFieldRemovedMessagePayload` -- added type `PaymentMethodCustomTypeRemovedMessagePayload` -- added type `PaymentMethodCustomTypeSetMessagePayload` -- added type `PaymentMethodDefaultSetMessagePayload` -- added type `PaymentMethodDeletedMessagePayload` -- added type `PaymentMethodInfoCustomFieldAddedMessagePayload` -- added type `PaymentMethodInfoCustomFieldChangedMessagePayload` -- added type `PaymentMethodInfoCustomFieldRemovedMessagePayload` -- added type `PaymentMethodInfoCustomTypeRemovedMessagePayload` -- added type `PaymentMethodInfoCustomTypeSetMessagePayload` -- added type `PaymentMethodInfoInterfaceAccountSetMessagePayload` -- added type `PaymentMethodInfoInterfaceSetMessagePayload` -- added type `PaymentMethodInfoMethodSetMessagePayload` -- added type `PaymentMethodInfoNameSetMessagePayload` -- added type `PaymentMethodInfoTokenSetMessagePayload` -- added type `PaymentMethodInterfaceAccountSetMessagePayload` -- added type `PaymentMethodKeySetMessagePayload` -- added type `PaymentMethodMethodSetMessagePayload` -- added type `PaymentMethodNameSetMessagePayload` -- added type `PaymentMethodPaymentInterfaceSetMessagePayload` -- added type `PaymentMethodPaymentMethodStatusSetMessagePayload` -- added type `RecurringOrderCreatedMessagePayload` -- added type `RecurringOrderCustomFieldAddedMessagePayload` -- added type `RecurringOrderCustomFieldChangedMessagePayload` -- added type `RecurringOrderCustomFieldRemovedMessagePayload` -- added type `RecurringOrderCustomTypeRemovedMessagePayload` -- added type `RecurringOrderCustomTypeSetMessagePayload` -- added type `RecurringOrderKeySetMessagePayload` -- added type `RecurringOrderMessagePayload` -- added type `RecurringOrderScheduleSetMessagePayload` -- added type `RecurringOrderStartsAtSetMessagePayload` -- added type `RecurringOrderStateChangedMessagePayload` -- added type `RecurringOrderStateTransitionMessagePayload` -- added type `StagedOrderChangePriceRoundingModeAction` -- added type `PaymentMethod` -- added type `PaymentMethodDraft` -- added type `PaymentMethodPagedQueryResponse` -- added type `PaymentMethodReference` -- added type `PaymentMethodStatus` -- added type `PaymentMethodToken` -- added type `PaymentMethodUpdate` -- added type `PaymentMethodUpdateAction` -- added type `PaymentMethodSetCustomFieldAction` -- added type `PaymentMethodSetCustomTypeAction` -- added type `PaymentMethodSetDefaultAction` -- added type `PaymentMethodSetInterfaceAccountAction` -- added type `PaymentMethodSetKeyAction` -- added type `PaymentMethodSetMethodAction` -- added type `PaymentMethodSetNameAction` -- added type `PaymentMethodSetPaymentInterfaceAction` -- added type `PaymentMethodSetPaymentMethodStatusAction` -- added type `PaymentMethodInfoDraft` -- added type `PaymentSetMethodInfoAction` -- added type `PaymentSetMethodInfoCustomFieldAction` -- added type `PaymentSetMethodInfoCustomTypeAction` -- added type `PaymentSetMethodInfoInterfaceAccountAction` -- added type `PaymentSetMethodInfoTokenAction` -- added type `ProductTailoringSetProductAttributeAction` -- added type `AttributeLevelEnum` -- added type `ProductSetProductAttributeAction` -- added type `ProjectChangePriceRoundingModeAction` -- added type `ProjectChangeTaxRoundingModeAction` -- added type `DayOfMonthSchedule` -- added type `DayOfMonthScheduleDraft` -- added type `IntervalUnit` -- added type `RecurrencePolicy` -- added type `RecurrencePolicyDraft` -- added type `RecurrencePolicyPagedQueryResponse` -- added type `RecurrencePolicyReference` -- added type `RecurrencePolicyResourceIdentifier` -- added type `RecurrencePolicySchedule` -- added type `RecurrencePolicyScheduleDraft` -- added type `RecurrencePolicyUpdate` -- added type `RecurrencePolicyUpdateAction` -- added type `StandardSchedule` -- added type `StandardScheduleDraft` -- added type `RecurrencePolicySetDescriptionAction` -- added type `RecurrencePolicySetKeyAction` -- added type `RecurrencePolicySetNameAction` -- added type `RecurrencePolicySetScheduleAction` -- added type `Counter` -- added type `CounterDraft` -- added type `CustomLineItemRecurrenceInfo` -- added type `CustomLineItemRecurrenceInfoDraft` -- added type `LineItemRecurrenceInfo` -- added type `LineItemRecurrenceInfoDraft` -- added type `PriceSelectionMode` -- added type `RecurringOrder` -- added type `RecurringOrderActive` -- added type `RecurringOrderCanceled` -- added type `RecurringOrderDraft` -- added type `RecurringOrderExpired` -- added type `RecurringOrderPagedQueryResponse` -- added type `RecurringOrderPaused` -- added type `RecurringOrderReference` -- added type `RecurringOrderResourceIdentifier` -- added type `RecurringOrderState` -- added type `RecurringOrderStateDraft` -- added type `RecurringOrderUpdate` -- added type `RecurringOrderUpdateAction` -- added type `SkipConfiguration` -- added type `SkipConfigurationDraft` -- added type `RecurringOrderSetCustomFieldAction` -- added type `RecurringOrderSetCustomTypeAction` -- added type `RecurringOrderSetKeyAction` -- added type `RecurringOrderSetOrderSkipConfigurationAction` -- added type `RecurringOrderSetScheduleAction` -- added type `RecurringOrderSetStartsAtAction` -- added type `RecurringOrderSetStateAction` -- added type `RecurringOrderTransitionStateAction` -
- - -
-Added QueryParameter(s) - -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/search` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/{ID}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` -
- - -
-Added Resource(s) - -- added resource `/{projectKey}/discount-groups` -- added resource `/{projectKey}/payment-methods` -- added resource `/{projectKey}/recurring-orders` -- added resource `/{projectKey}/recurrence-policies` -- added resource `/{projectKey}/discount-groups/key={key}` -- added resource `/{projectKey}/discount-groups/{ID}` -- added resource `/{projectKey}/payment-methods/key={key}` -- added resource `/{projectKey}/payment-methods/{ID}` -- added resource `/{projectKey}/recurring-orders/{ID}` -- added resource `/{projectKey}/recurring-orders/key={key}` -- added resource `/{projectKey}/recurrence-policies/key={key}` -- added resource `/{projectKey}/recurrence-policies/{ID}` -
- -**Import changes** - -
-Added Enum(s) - -- added enum `product-selection` to type `ImportResourceType` -
- - -
-Added Property(s) - -- added property `retentionPolicy` to type `ImportContainer` -- added property `expiresAt` to type `ImportContainer` -- added property `retentionPolicy` to type `ImportContainerDraft` -- added property `attributes` to type `ProductImport` -- added property `attributes` to type `ProductDraftImport` -- added property `level` to type `AttributeDefinition` -
- - -
-Changed Property(s) - -- :warning: changed property `country` of type `ExternalTaxRateDraft` from type `string` to `CountryCode` -- :warning: changed property `value` of type `MoneySetField` from type `Money[]` to `TypedMoney[]` -
- - -
-Added Method(s) - -- added method `apiRoot.withProjectKeyValue().productSelections().importContainers().withImportContainerKeyValue().post()` -
- -
Added Type(s) -- added type `StrategyEnum` -- added type `RetentionPolicy` -- added type `TimeToLiveConfig` -- added type `TimeToLiveRetentionPolicy` -- added type `ProductSelectionImportRequest` -- added type `AttributeLevel` -- added type `VariantSelectionType` -- added type `VariantSelection` -- added type `VariantExclusion` -- added type `ProductSelectionAssignment` -- added type `ProductSelectionMode` -- added type `ProductSelectionImport` -
- - -
-Added Resource(s) - -- added resource `/{projectKey}/product-selections` -- added resource `/{projectKey}/product-selections/import-containers` -- added resource `/{projectKey}/product-selections/import-containers/{importContainerKey}` -
- -**History changes** - -
-Added Enum(s) - -- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` -- added enum `payment-method` to type `ReferenceTypeId` -- added enum `RecurringOrderState` to type `StateTypeEnum` +- added type `ProductSearchFacetResultStats` +- added type `ProductSearchFacetStatsExpression` +- added type `ProductSearchFacetStatsValue`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStats.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStats.java new file mode 100644 index 00000000000..8a612f24464 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStats.java @@ -0,0 +1,199 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Result of a stats facet. The data type of min max, mean, and sum matches the data type of the field in the facet expression.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetResultStats productSearchFacetResultStats = ProductSearchFacetResultStats.builder()
+ *             .name("{name}")
+ *             .count(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductSearchFacetResultStatsImpl.class) +public interface ProductSearchFacetResultStats extends ProductSearchFacetResult { + + /** + *

The minimum value of the field, scoped to the faceted results.

+ * @return min + */ + @NotNull + @JsonProperty("min") + public Object getMin(); + + /** + *

The maximum value of the field, scoped to the faceted results.

+ * @return max + */ + @NotNull + @JsonProperty("max") + public Object getMax(); + + /** + *

The average value of the field calculated as sum / count.

+ *

Only returned for number fields.

+ * @return mean + */ + + @JsonProperty("mean") + public Object getMean(); + + /** + *

The sum of values of the field that match the facet expression.

+ *

Only returned for number fields.

+ * @return sum + */ + + @JsonProperty("sum") + public Object getSum(); + + /** + *

The total number of values counted that match the facet expression.

+ * @return count + */ + @NotNull + @JsonProperty("count") + public Long getCount(); + + /** + *

The minimum value of the field, scoped to the faceted results.

+ * @param min value to be set + */ + + public void setMin(final Object min); + + /** + *

The maximum value of the field, scoped to the faceted results.

+ * @param max value to be set + */ + + public void setMax(final Object max); + + /** + *

The average value of the field calculated as sum / count.

+ *

Only returned for number fields.

+ * @param mean value to be set + */ + + public void setMean(final Object mean); + + /** + *

The sum of values of the field that match the facet expression.

+ *

Only returned for number fields.

+ * @param sum value to be set + */ + + public void setSum(final Object sum); + + /** + *

The total number of values counted that match the facet expression.

+ * @param count value to be set + */ + + public void setCount(final Long count); + + /** + * factory method + * @return instance of ProductSearchFacetResultStats + */ + public static ProductSearchFacetResultStats of() { + return new ProductSearchFacetResultStatsImpl(); + } + + /** + * factory method to create a shallow copy ProductSearchFacetResultStats + * @param template instance to be copied + * @return copy instance + */ + public static ProductSearchFacetResultStats of(final ProductSearchFacetResultStats template) { + ProductSearchFacetResultStatsImpl instance = new ProductSearchFacetResultStatsImpl(); + instance.setName(template.getName()); + instance.setMin(template.getMin()); + instance.setMax(template.getMax()); + instance.setMean(template.getMean()); + instance.setSum(template.getSum()); + instance.setCount(template.getCount()); + return instance; + } + + public ProductSearchFacetResultStats copyDeep(); + + /** + * factory method to create a deep copy of ProductSearchFacetResultStats + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductSearchFacetResultStats deepCopy(@Nullable final ProductSearchFacetResultStats template) { + if (template == null) { + return null; + } + ProductSearchFacetResultStatsImpl instance = new ProductSearchFacetResultStatsImpl(); + instance.setName(template.getName()); + instance.setMin(template.getMin()); + instance.setMax(template.getMax()); + instance.setMean(template.getMean()); + instance.setSum(template.getSum()); + instance.setCount(template.getCount()); + return instance; + } + + /** + * builder factory method for ProductSearchFacetResultStats + * @return builder + */ + public static ProductSearchFacetResultStatsBuilder builder() { + return ProductSearchFacetResultStatsBuilder.of(); + } + + /** + * create builder for ProductSearchFacetResultStats instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetResultStatsBuilder builder(final ProductSearchFacetResultStats template) { + return ProductSearchFacetResultStatsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductSearchFacetResultStats(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsBuilder.java new file mode 100644 index 00000000000..d4aadb3cbc6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsBuilder.java @@ -0,0 +1,211 @@ + +package com.commercetools.api.models.product_search; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductSearchFacetResultStatsBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetResultStats productSearchFacetResultStats = ProductSearchFacetResultStats.builder()
+ *             .name("{name}")
+ *             .count(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetResultStatsBuilder implements Builder { + + private String name; + + private java.lang.Object min; + + private java.lang.Object max; + + @Nullable + private java.lang.Object mean; + + @Nullable + private java.lang.Object sum; + + private Long count; + + /** + *

Name of the facet.

+ * @param name value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

The minimum value of the field, scoped to the faceted results.

+ * @param min value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder min(final java.lang.Object min) { + this.min = min; + return this; + } + + /** + *

The maximum value of the field, scoped to the faceted results.

+ * @param max value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder max(final java.lang.Object max) { + this.max = max; + return this; + } + + /** + *

The average value of the field calculated as sum / count.

+ *

Only returned for number fields.

+ * @param mean value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder mean(@Nullable final java.lang.Object mean) { + this.mean = mean; + return this; + } + + /** + *

The sum of values of the field that match the facet expression.

+ *

Only returned for number fields.

+ * @param sum value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder sum(@Nullable final java.lang.Object sum) { + this.sum = sum; + return this; + } + + /** + *

The total number of values counted that match the facet expression.

+ * @param count value to be set + * @return Builder + */ + + public ProductSearchFacetResultStatsBuilder count(final Long count) { + this.count = count; + return this; + } + + /** + *

Name of the facet.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

The minimum value of the field, scoped to the faceted results.

+ * @return min + */ + + public java.lang.Object getMin() { + return this.min; + } + + /** + *

The maximum value of the field, scoped to the faceted results.

+ * @return max + */ + + public java.lang.Object getMax() { + return this.max; + } + + /** + *

The average value of the field calculated as sum / count.

+ *

Only returned for number fields.

+ * @return mean + */ + + @Nullable + public java.lang.Object getMean() { + return this.mean; + } + + /** + *

The sum of values of the field that match the facet expression.

+ *

Only returned for number fields.

+ * @return sum + */ + + @Nullable + public java.lang.Object getSum() { + return this.sum; + } + + /** + *

The total number of values counted that match the facet expression.

+ * @return count + */ + + public Long getCount() { + return this.count; + } + + /** + * builds ProductSearchFacetResultStats with checking for non-null required values + * @return ProductSearchFacetResultStats + */ + public ProductSearchFacetResultStats build() { + Objects.requireNonNull(name, ProductSearchFacetResultStats.class + ": name is missing"); + Objects.requireNonNull(min, ProductSearchFacetResultStats.class + ": min is missing"); + Objects.requireNonNull(max, ProductSearchFacetResultStats.class + ": max is missing"); + Objects.requireNonNull(count, ProductSearchFacetResultStats.class + ": count is missing"); + return new ProductSearchFacetResultStatsImpl(name, min, max, mean, sum, count); + } + + /** + * builds ProductSearchFacetResultStats without checking for non-null required values + * @return ProductSearchFacetResultStats + */ + public ProductSearchFacetResultStats buildUnchecked() { + return new ProductSearchFacetResultStatsImpl(name, min, max, mean, sum, count); + } + + /** + * factory method for an instance of ProductSearchFacetResultStatsBuilder + * @return builder + */ + public static ProductSearchFacetResultStatsBuilder of() { + return new ProductSearchFacetResultStatsBuilder(); + } + + /** + * create builder for ProductSearchFacetResultStats instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetResultStatsBuilder of(final ProductSearchFacetResultStats template) { + ProductSearchFacetResultStatsBuilder builder = new ProductSearchFacetResultStatsBuilder(); + builder.name = template.getName(); + builder.min = template.getMin(); + builder.max = template.getMax(); + builder.mean = template.getMean(); + builder.sum = template.getSum(); + builder.count = template.getCount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsImpl.java new file mode 100644 index 00000000000..24f76115c2b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsImpl.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Result of a stats facet. The data type of min max, mean, and sum matches the data type of the field in the facet expression.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetResultStatsImpl implements ProductSearchFacetResultStats, ModelBase { + + private String name; + + private java.lang.Object min; + + private java.lang.Object max; + + private java.lang.Object mean; + + private java.lang.Object sum; + + private Long count; + + /** + * create instance with all properties + */ + @JsonCreator + ProductSearchFacetResultStatsImpl(@JsonProperty("name") final String name, + @JsonProperty("min") final java.lang.Object min, @JsonProperty("max") final java.lang.Object max, + @JsonProperty("mean") final java.lang.Object mean, @JsonProperty("sum") final java.lang.Object sum, + @JsonProperty("count") final Long count) { + this.name = name; + this.min = min; + this.max = max; + this.mean = mean; + this.sum = sum; + this.count = count; + } + + /** + * create empty instance + */ + public ProductSearchFacetResultStatsImpl() { + } + + /** + *

Name of the facet.

+ */ + + public String getName() { + return this.name; + } + + /** + *

The minimum value of the field, scoped to the faceted results.

+ */ + + public java.lang.Object getMin() { + return this.min; + } + + /** + *

The maximum value of the field, scoped to the faceted results.

+ */ + + public java.lang.Object getMax() { + return this.max; + } + + /** + *

The average value of the field calculated as sum / count.

+ *

Only returned for number fields.

+ */ + + public java.lang.Object getMean() { + return this.mean; + } + + /** + *

The sum of values of the field that match the facet expression.

+ *

Only returned for number fields.

+ */ + + public java.lang.Object getSum() { + return this.sum; + } + + /** + *

The total number of values counted that match the facet expression.

+ */ + + public Long getCount() { + return this.count; + } + + public void setName(final String name) { + this.name = name; + } + + public void setMin(final java.lang.Object min) { + this.min = min; + } + + public void setMax(final java.lang.Object max) { + this.max = max; + } + + public void setMean(final java.lang.Object mean) { + this.mean = mean; + } + + public void setSum(final java.lang.Object sum) { + this.sum = sum; + } + + public void setCount(final Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductSearchFacetResultStatsImpl that = (ProductSearchFacetResultStatsImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(min, that.min) + .append(max, that.max) + .append(mean, that.mean) + .append(sum, that.sum) + .append(count, that.count) + .append(name, that.name) + .append(min, that.min) + .append(max, that.max) + .append(mean, that.mean) + .append(sum, that.sum) + .append(count, that.count) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name) + .append(min) + .append(max) + .append(mean) + .append(sum) + .append(count) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("min", min) + .append("max", max) + .append("mean", mean) + .append("sum", sum) + .append("count", count) + .build(); + } + + @Override + public ProductSearchFacetResultStats copyDeep() { + return ProductSearchFacetResultStats.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpression.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpression.java new file mode 100644 index 00000000000..a806899c954 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpression.java @@ -0,0 +1,128 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ProductSearchFacetStatsExpression + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetStatsExpression productSearchFacetStatsExpression = ProductSearchFacetStatsExpression.builder()
+ *             .stats(statsBuilder -> statsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductSearchFacetStatsExpressionImpl.class) +public interface ProductSearchFacetStatsExpression extends ProductSearchFacetExpression { + + /** + *

Definition of the stats facet.

+ * @return stats + */ + @NotNull + @Valid + @JsonProperty("stats") + public ProductSearchFacetStatsValue getStats(); + + /** + *

Definition of the stats facet.

+ * @param stats value to be set + */ + + public void setStats(final ProductSearchFacetStatsValue stats); + + /** + * factory method + * @return instance of ProductSearchFacetStatsExpression + */ + public static ProductSearchFacetStatsExpression of() { + return new ProductSearchFacetStatsExpressionImpl(); + } + + /** + * factory method to create a shallow copy ProductSearchFacetStatsExpression + * @param template instance to be copied + * @return copy instance + */ + public static ProductSearchFacetStatsExpression of(final ProductSearchFacetStatsExpression template) { + ProductSearchFacetStatsExpressionImpl instance = new ProductSearchFacetStatsExpressionImpl(); + instance.setStats(template.getStats()); + return instance; + } + + public ProductSearchFacetStatsExpression copyDeep(); + + /** + * factory method to create a deep copy of ProductSearchFacetStatsExpression + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductSearchFacetStatsExpression deepCopy( + @Nullable final ProductSearchFacetStatsExpression template) { + if (template == null) { + return null; + } + ProductSearchFacetStatsExpressionImpl instance = new ProductSearchFacetStatsExpressionImpl(); + instance.setStats( + com.commercetools.api.models.product_search.ProductSearchFacetStatsValue.deepCopy(template.getStats())); + return instance; + } + + /** + * builder factory method for ProductSearchFacetStatsExpression + * @return builder + */ + public static ProductSearchFacetStatsExpressionBuilder builder() { + return ProductSearchFacetStatsExpressionBuilder.of(); + } + + /** + * create builder for ProductSearchFacetStatsExpression instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetStatsExpressionBuilder builder(final ProductSearchFacetStatsExpression template) { + return ProductSearchFacetStatsExpressionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductSearchFacetStatsExpression(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionBuilder.java new file mode 100644 index 00000000000..f9227b7a56a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.product_search; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductSearchFacetStatsExpressionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetStatsExpression productSearchFacetStatsExpression = ProductSearchFacetStatsExpression.builder()
+ *             .stats(statsBuilder -> statsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetStatsExpressionBuilder implements Builder { + + private com.commercetools.api.models.product_search.ProductSearchFacetStatsValue stats; + + /** + *

Definition of the stats facet.

+ * @param builder function to build the stats value + * @return Builder + */ + + public ProductSearchFacetStatsExpressionBuilder stats( + Function builder) { + this.stats = builder.apply(com.commercetools.api.models.product_search.ProductSearchFacetStatsValueBuilder.of()) + .build(); + return this; + } + + /** + *

Definition of the stats facet.

+ * @param builder function to build the stats value + * @return Builder + */ + + public ProductSearchFacetStatsExpressionBuilder withStats( + Function builder) { + this.stats = builder + .apply(com.commercetools.api.models.product_search.ProductSearchFacetStatsValueBuilder.of()); + return this; + } + + /** + *

Definition of the stats facet.

+ * @param stats value to be set + * @return Builder + */ + + public ProductSearchFacetStatsExpressionBuilder stats( + final com.commercetools.api.models.product_search.ProductSearchFacetStatsValue stats) { + this.stats = stats; + return this; + } + + /** + *

Definition of the stats facet.

+ * @return stats + */ + + public com.commercetools.api.models.product_search.ProductSearchFacetStatsValue getStats() { + return this.stats; + } + + /** + * builds ProductSearchFacetStatsExpression with checking for non-null required values + * @return ProductSearchFacetStatsExpression + */ + public ProductSearchFacetStatsExpression build() { + Objects.requireNonNull(stats, ProductSearchFacetStatsExpression.class + ": stats is missing"); + return new ProductSearchFacetStatsExpressionImpl(stats); + } + + /** + * builds ProductSearchFacetStatsExpression without checking for non-null required values + * @return ProductSearchFacetStatsExpression + */ + public ProductSearchFacetStatsExpression buildUnchecked() { + return new ProductSearchFacetStatsExpressionImpl(stats); + } + + /** + * factory method for an instance of ProductSearchFacetStatsExpressionBuilder + * @return builder + */ + public static ProductSearchFacetStatsExpressionBuilder of() { + return new ProductSearchFacetStatsExpressionBuilder(); + } + + /** + * create builder for ProductSearchFacetStatsExpression instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetStatsExpressionBuilder of(final ProductSearchFacetStatsExpression template) { + ProductSearchFacetStatsExpressionBuilder builder = new ProductSearchFacetStatsExpressionBuilder(); + builder.stats = template.getStats(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionImpl.java new file mode 100644 index 00000000000..085369c6b9a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionImpl.java @@ -0,0 +1,81 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ProductSearchFacetStatsExpression + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetStatsExpressionImpl implements ProductSearchFacetStatsExpression, ModelBase { + + private com.commercetools.api.models.product_search.ProductSearchFacetStatsValue stats; + + /** + * create instance with all properties + */ + @JsonCreator + ProductSearchFacetStatsExpressionImpl( + @JsonProperty("stats") final com.commercetools.api.models.product_search.ProductSearchFacetStatsValue stats) { + this.stats = stats; + } + + /** + * create empty instance + */ + public ProductSearchFacetStatsExpressionImpl() { + } + + /** + *

Definition of the stats facet.

+ */ + + public com.commercetools.api.models.product_search.ProductSearchFacetStatsValue getStats() { + return this.stats; + } + + public void setStats(final com.commercetools.api.models.product_search.ProductSearchFacetStatsValue stats) { + this.stats = stats; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductSearchFacetStatsExpressionImpl that = (ProductSearchFacetStatsExpressionImpl) o; + + return new EqualsBuilder().append(stats, that.stats).append(stats, that.stats).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(stats).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("stats", stats).build(); + } + + @Override + public ProductSearchFacetStatsExpression copyDeep() { + return ProductSearchFacetStatsExpression.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValue.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValue.java new file mode 100644 index 00000000000..ff2d34dfb6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValue.java @@ -0,0 +1,196 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.search.SearchFieldType; +import com.commercetools.api.models.search.SearchQuery; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ProductSearchFacetStatsValue + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetStatsValue productSearchFacetStatsValue = ProductSearchFacetStatsValue.builder()
+ *             .name("{name}")
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductSearchFacetStatsValueImpl.class) +public interface ProductSearchFacetStatsValue { + + /** + *

Name of the stats facet to appear in the ProductSearchFacetResultStats.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

Whether the facet must consider only the Products resulting from the search (query) or all the Products (all).

+ * @return scope + */ + + @JsonProperty("scope") + public ProductSearchFacetScopeEnum getScope(); + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @return filter + */ + @Valid + @JsonProperty("filter") + public SearchQuery getFilter(); + + /** + *

The searchable Product field to facet on.

+ * @return field + */ + @NotNull + @JsonProperty("field") + public String getField(); + + /** + *

If the field is not standard, this must be the Attribute type.

+ * @return fieldType + */ + + @JsonProperty("fieldType") + public SearchFieldType getFieldType(); + + /** + *

Name of the stats facet to appear in the ProductSearchFacetResultStats.

+ * @param name value to be set + */ + + public void setName(final String name); + + /** + *

Whether the facet must consider only the Products resulting from the search (query) or all the Products (all).

+ * @param scope value to be set + */ + + public void setScope(final ProductSearchFacetScopeEnum scope); + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @param filter value to be set + */ + + public void setFilter(final SearchQuery filter); + + /** + *

The searchable Product field to facet on.

+ * @param field value to be set + */ + + public void setField(final String field); + + /** + *

If the field is not standard, this must be the Attribute type.

+ * @param fieldType value to be set + */ + + public void setFieldType(final SearchFieldType fieldType); + + /** + * factory method + * @return instance of ProductSearchFacetStatsValue + */ + public static ProductSearchFacetStatsValue of() { + return new ProductSearchFacetStatsValueImpl(); + } + + /** + * factory method to create a shallow copy ProductSearchFacetStatsValue + * @param template instance to be copied + * @return copy instance + */ + public static ProductSearchFacetStatsValue of(final ProductSearchFacetStatsValue template) { + ProductSearchFacetStatsValueImpl instance = new ProductSearchFacetStatsValueImpl(); + instance.setName(template.getName()); + instance.setScope(template.getScope()); + instance.setFilter(template.getFilter()); + instance.setField(template.getField()); + instance.setFieldType(template.getFieldType()); + return instance; + } + + public ProductSearchFacetStatsValue copyDeep(); + + /** + * factory method to create a deep copy of ProductSearchFacetStatsValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductSearchFacetStatsValue deepCopy(@Nullable final ProductSearchFacetStatsValue template) { + if (template == null) { + return null; + } + ProductSearchFacetStatsValueImpl instance = new ProductSearchFacetStatsValueImpl(); + instance.setName(template.getName()); + instance.setScope(template.getScope()); + instance.setFilter(com.commercetools.api.models.search.SearchQuery.deepCopy(template.getFilter())); + instance.setField(template.getField()); + instance.setFieldType(template.getFieldType()); + return instance; + } + + /** + * builder factory method for ProductSearchFacetStatsValue + * @return builder + */ + public static ProductSearchFacetStatsValueBuilder builder() { + return ProductSearchFacetStatsValueBuilder.of(); + } + + /** + * create builder for ProductSearchFacetStatsValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetStatsValueBuilder builder(final ProductSearchFacetStatsValue template) { + return ProductSearchFacetStatsValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductSearchFacetStatsValue(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueBuilder.java new file mode 100644 index 00000000000..dbb31520cb1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueBuilder.java @@ -0,0 +1,212 @@ + +package com.commercetools.api.models.product_search; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductSearchFacetStatsValueBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductSearchFacetStatsValue productSearchFacetStatsValue = ProductSearchFacetStatsValue.builder()
+ *             .name("{name}")
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetStatsValueBuilder implements Builder { + + private String name; + + @Nullable + private com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum scope; + + @Nullable + private com.commercetools.api.models.search.SearchQuery filter; + + private String field; + + @Nullable + private com.commercetools.api.models.search.SearchFieldType fieldType; + + /** + *

Name of the stats facet to appear in the ProductSearchFacetResultStats.

+ * @param name value to be set + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

Whether the facet must consider only the Products resulting from the search (query) or all the Products (all).

+ * @param scope value to be set + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder scope( + @Nullable final com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @param builder function to build the filter value + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder filter( + Function builder) { + this.filter = builder.apply(com.commercetools.api.models.search.SearchQueryBuilder.of()).build(); + return this; + } + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @param builder function to build the filter value + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder withFilter( + Function builder) { + this.filter = builder.apply(com.commercetools.api.models.search.SearchQueryBuilder.of()); + return this; + } + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @param filter value to be set + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder filter( + @Nullable final com.commercetools.api.models.search.SearchQuery filter) { + this.filter = filter; + return this; + } + + /** + *

The searchable Product field to facet on.

+ * @param field value to be set + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder field(final String field) { + this.field = field; + return this; + } + + /** + *

If the field is not standard, this must be the Attribute type.

+ * @param fieldType value to be set + * @return Builder + */ + + public ProductSearchFacetStatsValueBuilder fieldType( + @Nullable final com.commercetools.api.models.search.SearchFieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + *

Name of the stats facet to appear in the ProductSearchFacetResultStats.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

Whether the facet must consider only the Products resulting from the search (query) or all the Products (all).

+ * @return scope + */ + + @Nullable + public com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum getScope() { + return this.scope; + } + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ * @return filter + */ + + @Nullable + public com.commercetools.api.models.search.SearchQuery getFilter() { + return this.filter; + } + + /** + *

The searchable Product field to facet on.

+ * @return field + */ + + public String getField() { + return this.field; + } + + /** + *

If the field is not standard, this must be the Attribute type.

+ * @return fieldType + */ + + @Nullable + public com.commercetools.api.models.search.SearchFieldType getFieldType() { + return this.fieldType; + } + + /** + * builds ProductSearchFacetStatsValue with checking for non-null required values + * @return ProductSearchFacetStatsValue + */ + public ProductSearchFacetStatsValue build() { + Objects.requireNonNull(name, ProductSearchFacetStatsValue.class + ": name is missing"); + Objects.requireNonNull(field, ProductSearchFacetStatsValue.class + ": field is missing"); + return new ProductSearchFacetStatsValueImpl(name, scope, filter, field, fieldType); + } + + /** + * builds ProductSearchFacetStatsValue without checking for non-null required values + * @return ProductSearchFacetStatsValue + */ + public ProductSearchFacetStatsValue buildUnchecked() { + return new ProductSearchFacetStatsValueImpl(name, scope, filter, field, fieldType); + } + + /** + * factory method for an instance of ProductSearchFacetStatsValueBuilder + * @return builder + */ + public static ProductSearchFacetStatsValueBuilder of() { + return new ProductSearchFacetStatsValueBuilder(); + } + + /** + * create builder for ProductSearchFacetStatsValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSearchFacetStatsValueBuilder of(final ProductSearchFacetStatsValue template) { + ProductSearchFacetStatsValueBuilder builder = new ProductSearchFacetStatsValueBuilder(); + builder.name = template.getName(); + builder.scope = template.getScope(); + builder.filter = template.getFilter(); + builder.field = template.getField(); + builder.fieldType = template.getFieldType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueImpl.java new file mode 100644 index 00000000000..cac11373cbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueImpl.java @@ -0,0 +1,164 @@ + +package com.commercetools.api.models.product_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ProductSearchFacetStatsValue + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSearchFacetStatsValueImpl implements ProductSearchFacetStatsValue, ModelBase { + + private String name; + + private com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum scope; + + private com.commercetools.api.models.search.SearchQuery filter; + + private String field; + + private com.commercetools.api.models.search.SearchFieldType fieldType; + + /** + * create instance with all properties + */ + @JsonCreator + ProductSearchFacetStatsValueImpl(@JsonProperty("name") final String name, + @JsonProperty("scope") final com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum scope, + @JsonProperty("filter") final com.commercetools.api.models.search.SearchQuery filter, + @JsonProperty("field") final String field, + @JsonProperty("fieldType") final com.commercetools.api.models.search.SearchFieldType fieldType) { + this.name = name; + this.scope = scope; + this.filter = filter; + this.field = field; + this.fieldType = fieldType; + } + + /** + * create empty instance + */ + public ProductSearchFacetStatsValueImpl() { + } + + /** + *

Name of the stats facet to appear in the ProductSearchFacetResultStats.

+ */ + + public String getName() { + return this.name; + } + + /** + *

Whether the facet must consider only the Products resulting from the search (query) or all the Products (all).

+ */ + + public com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum getScope() { + return this.scope; + } + + /** + *

Additional filtering expression to apply to the search result before calculating the facet.

+ */ + + public com.commercetools.api.models.search.SearchQuery getFilter() { + return this.filter; + } + + /** + *

The searchable Product field to facet on.

+ */ + + public String getField() { + return this.field; + } + + /** + *

If the field is not standard, this must be the Attribute type.

+ */ + + public com.commercetools.api.models.search.SearchFieldType getFieldType() { + return this.fieldType; + } + + public void setName(final String name) { + this.name = name; + } + + public void setScope(final com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum scope) { + this.scope = scope; + } + + public void setFilter(final com.commercetools.api.models.search.SearchQuery filter) { + this.filter = filter; + } + + public void setField(final String field) { + this.field = field; + } + + public void setFieldType(final com.commercetools.api.models.search.SearchFieldType fieldType) { + this.fieldType = fieldType; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductSearchFacetStatsValueImpl that = (ProductSearchFacetStatsValueImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(scope, that.scope) + .append(filter, that.filter) + .append(field, that.field) + .append(fieldType, that.fieldType) + .append(name, that.name) + .append(scope, that.scope) + .append(filter, that.filter) + .append(field, that.field) + .append(fieldType, that.fieldType) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name) + .append(scope) + .append(filter) + .append(field) + .append(fieldType) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("scope", scope) + .append("filter", filter) + .append("field", field) + .append("fieldType", fieldType) + .build(); + } + + @Override + public ProductSearchFacetStatsValue copyDeep() { + return ProductSearchFacetStatsValue.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetExpressionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetExpressionQueryBuilderDsl.java index 16b7939b3a8..b771d6e45a2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetExpressionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetExpressionQueryBuilderDsl.java @@ -36,4 +36,12 @@ public CombinationQueryPredicate as .of()), ProductSearchFacetExpressionQueryBuilderDsl::of); } + + public CombinationQueryPredicate asProductSearchFacetStatsExpression( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_search.ProductSearchFacetStatsExpressionQueryBuilderDsl + .of()), + ProductSearchFacetExpressionQueryBuilderDsl::of); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultQueryBuilderDsl.java index a707b1c4400..ffeecc945e6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultQueryBuilderDsl.java @@ -32,4 +32,11 @@ public CombinationQueryPredicate asProd com.commercetools.api.predicates.query.product_search.ProductSearchFacetResultCountQueryBuilderDsl.of()), ProductSearchFacetResultQueryBuilderDsl::of); } + + public CombinationQueryPredicate asProductSearchFacetResultStats( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_search.ProductSearchFacetResultStatsQueryBuilderDsl.of()), + ProductSearchFacetResultQueryBuilderDsl::of); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultStatsQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultStatsQueryBuilderDsl.java new file mode 100644 index 00000000000..2b5515c9f73 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetResultStatsQueryBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.query.product_search; + +import com.commercetools.api.predicates.query.*; + +public class ProductSearchFacetResultStatsQueryBuilderDsl { + public ProductSearchFacetResultStatsQueryBuilderDsl() { + } + + public static ProductSearchFacetResultStatsQueryBuilderDsl of() { + return new ProductSearchFacetResultStatsQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder min() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("min")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder max() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("max")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder mean() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("mean")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sum() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sum")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder count() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("count")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetResultStatsQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsExpressionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsExpressionQueryBuilderDsl.java new file mode 100644 index 00000000000..4405ac62bc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsExpressionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.product_search; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductSearchFacetStatsExpressionQueryBuilderDsl { + public ProductSearchFacetStatsExpressionQueryBuilderDsl() { + } + + public static ProductSearchFacetStatsExpressionQueryBuilderDsl of() { + return new ProductSearchFacetStatsExpressionQueryBuilderDsl(); + } + + public CombinationQueryPredicate stats( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("stats")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_search.ProductSearchFacetStatsValueQueryBuilderDsl + .of())), + ProductSearchFacetStatsExpressionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsValueQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsValueQueryBuilderDsl.java new file mode 100644 index 00000000000..0a3adeae935 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_search/ProductSearchFacetStatsValueQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_search; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductSearchFacetStatsValueQueryBuilderDsl { + public ProductSearchFacetStatsValueQueryBuilderDsl() { + } + + public static ProductSearchFacetStatsValueQueryBuilderDsl of() { + return new ProductSearchFacetStatsValueQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetStatsValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder scope() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("scope")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetStatsValueQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate filter( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("filter")) + .inner(fn.apply(com.commercetools.api.predicates.query.search.SearchQueryQueryBuilderDsl.of())), + ProductSearchFacetStatsValueQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder field() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("field")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetStatsValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder fieldType() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldType")), + p -> new CombinationQueryPredicate<>(p, ProductSearchFacetStatsValueQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsTest.java new file mode 100644 index 00000000000..c6ce3ca25fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetResultStatsTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.models.product_search; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductSearchFacetResultStatsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductSearchFacetResultStatsBuilder builder) { + ProductSearchFacetResultStats productSearchFacetResultStats = builder.buildUnchecked(); + Assertions.assertThat(productSearchFacetResultStats).isInstanceOf(ProductSearchFacetResultStats.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "min", ProductSearchFacetResultStats.builder().min("min") }, + new Object[] { "max", ProductSearchFacetResultStats.builder().max("max") }, + new Object[] { "mean", ProductSearchFacetResultStats.builder().mean("mean") }, + new Object[] { "sum", ProductSearchFacetResultStats.builder().sum("sum") }, + new Object[] { "count", ProductSearchFacetResultStats.builder().count(2L) } }; + } + + @Test + public void min() { + ProductSearchFacetResultStats value = ProductSearchFacetResultStats.of(); + value.setMin("min"); + Assertions.assertThat(value.getMin()).isEqualTo("min"); + } + + @Test + public void max() { + ProductSearchFacetResultStats value = ProductSearchFacetResultStats.of(); + value.setMax("max"); + Assertions.assertThat(value.getMax()).isEqualTo("max"); + } + + @Test + public void mean() { + ProductSearchFacetResultStats value = ProductSearchFacetResultStats.of(); + value.setMean("mean"); + Assertions.assertThat(value.getMean()).isEqualTo("mean"); + } + + @Test + public void sum() { + ProductSearchFacetResultStats value = ProductSearchFacetResultStats.of(); + value.setSum("sum"); + Assertions.assertThat(value.getSum()).isEqualTo("sum"); + } + + @Test + public void count() { + ProductSearchFacetResultStats value = ProductSearchFacetResultStats.of(); + value.setCount(2L); + Assertions.assertThat(value.getCount()).isEqualTo(2L); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionTest.java new file mode 100644 index 00000000000..2876b53c99d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsExpressionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.product_search; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductSearchFacetStatsExpressionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductSearchFacetStatsExpressionBuilder builder) { + ProductSearchFacetStatsExpression productSearchFacetStatsExpression = builder.buildUnchecked(); + Assertions.assertThat(productSearchFacetStatsExpression).isInstanceOf(ProductSearchFacetStatsExpression.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "stats", ProductSearchFacetStatsExpression.builder() + .stats(new com.commercetools.api.models.product_search.ProductSearchFacetStatsValueImpl()) } }; + } + + @Test + public void stats() { + ProductSearchFacetStatsExpression value = ProductSearchFacetStatsExpression.of(); + value.setStats(new com.commercetools.api.models.product_search.ProductSearchFacetStatsValueImpl()); + Assertions.assertThat(value.getStats()) + .isEqualTo(new com.commercetools.api.models.product_search.ProductSearchFacetStatsValueImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueTest.java new file mode 100644 index 00000000000..8d24ad8b8a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_search/ProductSearchFacetStatsValueTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.api.models.product_search; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductSearchFacetStatsValueTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductSearchFacetStatsValueBuilder builder) { + ProductSearchFacetStatsValue productSearchFacetStatsValue = builder.buildUnchecked(); + Assertions.assertThat(productSearchFacetStatsValue).isInstanceOf(ProductSearchFacetStatsValue.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", ProductSearchFacetStatsValue.builder().name("name") }, + new Object[] { "scope", + ProductSearchFacetStatsValue.builder() + .scope(com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum + .findEnum("all")) }, + new Object[] { "filter", + ProductSearchFacetStatsValue.builder() + .filter(new com.commercetools.api.models.search.SearchQueryImpl()) }, + new Object[] { "field", ProductSearchFacetStatsValue.builder().field("field") }, + new Object[] { "fieldType", ProductSearchFacetStatsValue.builder() + .fieldType(com.commercetools.api.models.search.SearchFieldType.findEnum("boolean")) } }; + } + + @Test + public void name() { + ProductSearchFacetStatsValue value = ProductSearchFacetStatsValue.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void scope() { + ProductSearchFacetStatsValue value = ProductSearchFacetStatsValue.of(); + value.setScope(com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum.findEnum("all")); + Assertions.assertThat(value.getScope()) + .isEqualTo(com.commercetools.api.models.product_search.ProductSearchFacetScopeEnum.findEnum("all")); + } + + @Test + public void filter() { + ProductSearchFacetStatsValue value = ProductSearchFacetStatsValue.of(); + value.setFilter(new com.commercetools.api.models.search.SearchQueryImpl()); + Assertions.assertThat(value.getFilter()).isEqualTo(new com.commercetools.api.models.search.SearchQueryImpl()); + } + + @Test + public void field() { + ProductSearchFacetStatsValue value = ProductSearchFacetStatsValue.of(); + value.setField("field"); + Assertions.assertThat(value.getField()).isEqualTo("field"); + } + + @Test + public void fieldType() { + ProductSearchFacetStatsValue value = ProductSearchFacetStatsValue.of(); + value.setFieldType(com.commercetools.api.models.search.SearchFieldType.findEnum("boolean")); + Assertions.assertThat(value.getFieldType()) + .isEqualTo(com.commercetools.api.models.search.SearchFieldType.findEnum("boolean")); + } +} diff --git a/references.txt b/references.txt index e0ffb676d9d..4d4e2af9c9d 100644 --- a/references.txt +++ b/references.txt @@ -439,3 +439,4 @@ c12d33dda145602c607dcf1bb77f503f4508a1ee 998e6d8a204bc1a4d6b269583134605798eaef41 4f44e52ef2a04385fb8da09182511dd63ff5ee37 5c92f154265d21fff776730b17f7c6f27cbfdcb7 +cd07396232802b1c29238fb92214946462f19e5d