diff --git a/changes.md b/changes.md index 6fc624342a2..67436239170 100644 --- a/changes.md +++ b/changes.md @@ -1,5 +1,47 @@ **Api changes** +
+Added Property(s) + +- added property `perMethodTaxRate` to type `CustomLineItem` +- added property `lineItemKey` to type `CartApplyDeltaToLineItemShippingDetailsTargetsAction` +- added property `lineItemKey` to type `CartChangeLineItemQuantityAction` +- added property `lineItemKey` to type `CartRemoveLineItemAction` +- added property `lineItemKey` to type `CartSetLineItemCustomFieldAction` +- added property `lineItemKey` to type `CartSetLineItemCustomTypeAction` +- added property `lineItemKey` to type `CartSetLineItemDistributionChannelAction` +- added property `lineItemKey` to type `CartSetLineItemInventoryModeAction` +- added property `lineItemKey` to type `CartSetLineItemPriceAction` +- added property `lineItemKey` to type `CartSetLineItemShippingDetailsAction` +- added property `lineItemKey` to type `CartSetLineItemSupplyChannelAction` +- added property `lineItemKey` to type `CartSetLineItemTaxAmountAction` +- added property `lineItemKey` to type `CartSetLineItemTaxRateAction` +- added property `lineItemKey` to type `CartSetLineItemTotalPriceAction` +- added property `lineItemKey` to type `MyCartApplyDeltaToLineItemShippingDetailsTargetsAction` +- added property `lineItemKey` to type `MyCartChangeLineItemQuantityAction` +- added property `lineItemKey` to type `MyCartRemoveLineItemAction` +- added property `lineItemKey` to type `MyCartSetLineItemCustomFieldAction` +- added property `lineItemKey` to type `MyCartSetLineItemCustomTypeAction` +- added property `lineItemKey` to type `MyCartSetLineItemDistributionChannelAction` +- added property `lineItemKey` to type `MyCartSetLineItemShippingDetailsAction` +- added property `lineItemKey` to type `MyCartSetLineItemSupplyChannelAction` +- added property `lineItemKey` to type `MyShoppingListChangeLineItemQuantityAction` +- added property `lineItemKey` to type `StagedOrderChangeLineItemQuantityAction` +- added property `lineItemKey` to type `StagedOrderRemoveLineItemAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemCustomFieldAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemCustomTypeAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemDistributionChannelAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemPriceAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemShippingDetailsAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemTaxAmountAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemTaxRateAction` +- added property `lineItemKey` to type `StagedOrderSetLineItemTotalPriceAction` +- added property `lineItemKey` to type `OrderSetLineItemCustomFieldAction` +- added property `lineItemKey` to type `OrderSetLineItemCustomTypeAction` +- added property `lineItemKey` to type `OrderSetLineItemShippingDetailsAction` +
+ +
Required Property(s) @@ -42,44 +84,10 @@
-Added Property(s) +Deprecated Type(s) -- added property `perMethodTaxRate` to type `CustomLineItem` -- added property `lineItemKey` to type `CartApplyDeltaToLineItemShippingDetailsTargetsAction` -- added property `lineItemKey` to type `CartChangeLineItemQuantityAction` -- added property `lineItemKey` to type `CartRemoveLineItemAction` -- added property `lineItemKey` to type `CartSetLineItemCustomFieldAction` -- added property `lineItemKey` to type `CartSetLineItemCustomTypeAction` -- added property `lineItemKey` to type `CartSetLineItemDistributionChannelAction` -- added property `lineItemKey` to type `CartSetLineItemInventoryModeAction` -- added property `lineItemKey` to type `CartSetLineItemPriceAction` -- added property `lineItemKey` to type `CartSetLineItemShippingDetailsAction` -- added property `lineItemKey` to type `CartSetLineItemSupplyChannelAction` -- added property `lineItemKey` to type `CartSetLineItemTaxAmountAction` -- added property `lineItemKey` to type `CartSetLineItemTaxRateAction` -- added property `lineItemKey` to type `CartSetLineItemTotalPriceAction` -- added property `lineItemKey` to type `MyCartApplyDeltaToLineItemShippingDetailsTargetsAction` -- added property `lineItemKey` to type `MyCartChangeLineItemQuantityAction` -- added property `lineItemKey` to type `MyCartRemoveLineItemAction` -- added property `lineItemKey` to type `MyCartSetLineItemCustomFieldAction` -- added property `lineItemKey` to type `MyCartSetLineItemCustomTypeAction` -- added property `lineItemKey` to type `MyCartSetLineItemDistributionChannelAction` -- added property `lineItemKey` to type `MyCartSetLineItemShippingDetailsAction` -- added property `lineItemKey` to type `MyCartSetLineItemSupplyChannelAction` -- added property `lineItemKey` to type `MyShoppingListChangeLineItemQuantityAction` -- added property `lineItemKey` to type `StagedOrderChangeLineItemQuantityAction` -- added property `lineItemKey` to type `StagedOrderRemoveLineItemAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemCustomFieldAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemCustomTypeAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemDistributionChannelAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemPriceAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemShippingDetailsAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemTaxAmountAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemTaxRateAction` -- added property `lineItemKey` to type `StagedOrderSetLineItemTotalPriceAction` -- added property `lineItemKey` to type `OrderSetLineItemCustomFieldAction` -- added property `lineItemKey` to type `OrderSetLineItemCustomTypeAction` -- added property `lineItemKey` to type `OrderSetLineItemShippingDetailsAction` +- type `ProductVariantSelectionExclusion` is removed +- type `ProductVariantSelectionInclusion` is removed
@@ -89,3 +97,150 @@ - :warning: removed type `MyCartSetDirectDiscountsAction`
+**History changes** + +
+Added Property(s) + +- added property `variantSelection` to type `AddProductChange` +
+ + +
+Changed Property(s) + +- :warning: changed property `resource` of type `Record` from type `Reference` to `ResourceIdentifier` +
+ + +
+Added QueryParameter(s) + +- added query parameter `resourceKey` to method `get /{projectKey}` +- added query parameter `resourceKey` to method `get /{projectKey}/{resourceType}` +
+ + +
+Removed QueryParameter(s) + +- :warning: removed query parameter `resourceId` from method `get /{projectKey}/{resourceType}` +
+ + +
+Added Type(s) + +- added type `AddAssociateChange` +- added type `AddProductSelectionChange` +- added type `Associate` +- added type `AssociateRoleAssignment` +- added type `AssociateRoleInheritanceMode` +- added type `BusinessUnitAssociateMode` +- added type `BusinessUnitLabel` +- added type `BusinessUnitStatus` +- added type `BusinessUnitStoreMode` +- added type `ChangeAssociateChange` +- added type `ChangeAssociateModeChange` +- added type `ChangeParentUnitChange` +- added type `ChangeProductSelectionActiveChange` +- added type `ChangeStatusChange` +- added type `ProductVariantSelection` +- added type `ProductVariantSelectionTypeEnum` +- added type `RemoveAssociateChange` +- added type `RemoveProductSelectionChange` +- added type `RequestQuoteRenegotiationChange` +- added type `ResourceIdentifier` +- added type `SetAddressCustomFieldChange` +- added type `SetAddressCustomTypeChange` +- added type `SetContactEmailChange` +- added type `SetStoreModeChange` +- added type `SetVariantSelectionChange` +
+ + +
+Added Enum(s) + +- added enum `business-unit` to type `ChangeHistoryResourceType` +- added enum `addAssociate` to type `UpdateType` +- added enum `addCustomLineItem` to type `UpdateType` +- added enum `addDiscountCode` to type `UpdateType` +- added enum `addProduct` to type `UpdateType` +- added enum `addProductSelection` to type `UpdateType` +- added enum `addProperty` to type `UpdateType` +- added enum `changeAmountAuthorized` to type `UpdateType` +- added enum `changeAssociate` to type `UpdateType` +- added enum `changeAssociateMode` to type `UpdateType` +- added enum `changeCustomLineItemQuantity` to type `UpdateType` +- added enum `changeLineItemName` to type `UpdateType` +- added enum `changeParentUnit` to type `UpdateType` +- added enum `changeProductSelectionActive` to type `UpdateType` +- added enum `changeQuoteRequestState` to type `UpdateType` +- added enum `changeQuoteState` to type `UpdateType` +- added enum `changeStagedQuoteState` to type `UpdateType` +- added enum `changeStatus` to type `UpdateType` +- added enum `changeTaxCalculationMode` to type `UpdateType` +- added enum `changeTaxMode` to type `UpdateType` +- added enum `changeTaxRoundingMode` to type `UpdateType` +- added enum `moveImageToPosition` to type `UpdateType` +- added enum `removeAssociate` to type `UpdateType` +- added enum `removeCustomLineItem` to type `UpdateType` +- added enum `removeDiscountCode` to type `UpdateType` +- added enum `removeProduct` to type `UpdateType` +- added enum `removeProductSelection` to type `UpdateType` +- added enum `removeProperty` to type `UpdateType` +- added enum `requestQuoteRenegotiation` to type `UpdateType` +- added enum `setAddressCustomField` to type `UpdateType` +- added enum `setAddressCustomType` to type `UpdateType` +- added enum `setApplicationVersion` to type `UpdateType` +- added enum `setAuthenticationMode` to type `UpdateType` +- added enum `setContactEmail` to type `UpdateType` +- added enum `setCountries` to type `UpdateType` +- added enum `setCountry` to type `UpdateType` +- added enum `setCustomLineItemMoney` to type `UpdateType` +- added enum `setCustomLineItemTaxAmount` to type `UpdateType` +- added enum `setCustomLineItemTaxCategory` to type `UpdateType` +- added enum `setCustomLineItemTaxRate` to type `UpdateType` +- added enum `setCustomLineItemTaxedPrice` to type `UpdateType` +- added enum `setCustomLineItemTotalPrice` to type `UpdateType` +- added enum `setCustomShippingMethod` to type `UpdateType` +- added enum `setIsValid` to type `UpdateType` +- added enum `setLineItemDeactivatedAt` to type `UpdateType` +- added enum `setLineItemDiscountedPrice` to type `UpdateType` +- added enum `setLineItemDiscountedPricePerQuantity` to type `UpdateType` +- added enum `setLineItemDistributionChannel` to type `UpdateType` +- added enum `setLineItemPrice` to type `UpdateType` +- added enum `setLineItemProductKey` to type `UpdateType` +- added enum `setLineItemProductSlug` to type `UpdateType` +- added enum `setLineItemTaxAmount` to type `UpdateType` +- added enum `setLineItemTaxRate` to type `UpdateType` +- added enum `setLineItemTaxedPrice` to type `UpdateType` +- added enum `setLineItemTotalPrice` to type `UpdateType` +- added enum `setOrderTaxedPrice` to type `UpdateType` +- added enum `setOrderTotalPrice` to type `UpdateType` +- added enum `setOrderTotalTax` to type `UpdateType` +- added enum `setPrices` to type `UpdateType` +- added enum `setProductCount` to type `UpdateType` +- added enum `setProductSelections` to type `UpdateType` +- added enum `setProperty` to type `UpdateType` +- added enum `setPurchaseOrderNumber` to type `UpdateType` +- added enum `setReservations` to type `UpdateType` +- added enum `setSellerComment` to type `UpdateType` +- added enum `setShippingInfoPrice` to type `UpdateType` +- added enum `setShippingInfoTaxedPrice` to type `UpdateType` +- added enum `setShippingMethod` to type `UpdateType` +- added enum `setShippingMethodTaxAmount` to type `UpdateType` +- added enum `setShippingMethodTaxRate` to type `UpdateType` +- added enum `setShippingRate` to type `UpdateType` +- added enum `setShippingRateInput` to type `UpdateType` +- added enum `setStoreMode` to type `UpdateType` +- added enum `setSupplyChannels` to type `UpdateType` +- added enum `setValidTo` to type `UpdateType` +- added enum `setValue` to type `UpdateType` +- added enum `setVariantSelection` to type `UpdateType` +- added enum `DeclinedForRenegotiation` to type `QuoteState` +- added enum `associate-role` to type `ReferenceTypeId` +- added enum `business-unit` to type `ReferenceTypeId` +
+ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRole.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRole.java index 31ddc8e065a..ea1853b6b01 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRole.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRole.java @@ -40,7 +40,7 @@ */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AssociateRoleImpl.class) -public interface AssociateRole extends BaseResource { +public interface AssociateRole extends BaseResource, com.commercetools.api.models.Identifiable { /** *

Unique identifier of the AssociateRole.

diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRoleReference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRoleReference.java index 350c087f546..02212f08bab 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRoleReference.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/associate_role/AssociateRoleReference.java @@ -30,7 +30,7 @@ */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AssociateRoleReferenceImpl.class) -public interface AssociateRoleReference extends Reference, com.commercetools.api.models.Identifiable { +public interface AssociateRoleReference extends Reference { /** * discriminator value for AssociateRoleReference diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemAction.java index 6db9c679181..10851c86dca 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemAction.java @@ -52,7 +52,7 @@ public interface CartRemoveLineItemAction extends CartUpdateAction { public String getLineItemKey(); /** - *

New value to set. If absent or 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @return quantity */ @@ -98,7 +98,7 @@ public interface CartRemoveLineItemAction extends CartUpdateAction { public void setLineItemKey(final String lineItemKey); /** - *

New value to set. If absent or 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @param quantity value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionBuilder.java index 93d15d7426b..0d0d1733227 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionBuilder.java @@ -64,7 +64,7 @@ public CartRemoveLineItemActionBuilder lineItemKey(@Nullable final String lineIt } /** - *

New value to set. If absent or 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @param quantity value to be set * @return Builder */ @@ -209,7 +209,7 @@ public String getLineItemKey() { } /** - *

New value to set. If absent or 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @return quantity */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionImpl.java index bdf339cf8df..4e41ca2f135 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRemoveLineItemActionImpl.java @@ -84,7 +84,7 @@ public String getLineItemKey() { } /** - *

New value to set. If absent or 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

*/ public Long getQuantity() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixed.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixed.java index aa541dfe131..a428ec975e7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixed.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixed.java @@ -17,7 +17,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money field, this Discount is not applied.

+ *

Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money field, this Discount is not applied. If the quantity of the Line Item eligible for the Discount is greater than 1, the fixed price discount is only applied to the Line Item portion for which the money value is lesser than their current price.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixedImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixedImpl.java index 0549d3dc85f..1e51a0a8801 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixedImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountValueFixedImpl.java @@ -15,7 +15,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money field, this Discount is not applied.

+ *

Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money field, this Discount is not applied. If the quantity of the Line Item eligible for the Discount is greater than 1, the fixed price discount is only applied to the Line Item portion for which the money value is lesser than their current price.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartDiscountValueFixedImpl implements CartDiscountValueFixed, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemAction.java index 48ea659f3c8..34bf8736c90 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemAction.java @@ -54,8 +54,7 @@ public interface MyCartRemoveLineItemAction extends MyCartUpdateAction { public String getLineItemKey(); /** - *

New value to set.

- *

If 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @return quantity */ @@ -101,8 +100,7 @@ public interface MyCartRemoveLineItemAction extends MyCartUpdateAction { public void setLineItemKey(final String lineItemKey); /** - *

New value to set.

- *

If 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @param quantity value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionBuilder.java index 0fea78a43cd..9bd7a8813a1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionBuilder.java @@ -64,8 +64,7 @@ public MyCartRemoveLineItemActionBuilder lineItemKey(@Nullable final String line } /** - *

New value to set.

- *

If 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @param quantity value to be set * @return Builder */ @@ -210,8 +209,7 @@ public String getLineItemKey() { } /** - *

New value to set.

- *

If 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

* @return quantity */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionImpl.java index ef968d636aa..4b2974b2db7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRemoveLineItemActionImpl.java @@ -84,8 +84,7 @@ public String getLineItemKey() { } /** - *

New value to set.

- *

If 0, the Line Item is removed from the Cart.

+ *

Amount to subtract from the LineItem's quantity. If absent, the LineItem is removed from the Cart.

*/ public Long getQuantity() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelection.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelection.java index 5857cde9968..fb8bf21c542 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelection.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelection.java @@ -27,10 +27,8 @@ * */ @JsonSubTypes({ - @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductVariantSelectionExclusionImpl.class, name = ProductVariantSelectionExclusion.EXCLUSION), @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExceptImpl.class, name = ProductVariantSelectionIncludeAllExcept.INCLUDE_ALL_EXCEPT), - @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnlyImpl.class, name = ProductVariantSelectionIncludeOnly.INCLUDE_ONLY), - @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductVariantSelectionInclusionImpl.class, name = ProductVariantSelectionInclusion.INCLUSION) }) + @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnlyImpl.class, name = ProductVariantSelectionIncludeOnly.INCLUDE_ONLY) }) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = ProductVariantSelectionImpl.class, visible = true) @JsonDeserialize(as = ProductVariantSelectionImpl.class) @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @@ -54,10 +52,6 @@ public static ProductVariantSelection deepCopy(@Nullable final ProductVariantSel if (template == null) { return null; } - if (template instanceof com.commercetools.api.models.product_selection.ProductVariantSelectionExclusion) { - return com.commercetools.api.models.product_selection.ProductVariantSelectionExclusion.deepCopy( - (com.commercetools.api.models.product_selection.ProductVariantSelectionExclusion) template); - } if (template instanceof com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExcept) { return com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExcept.deepCopy( (com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExcept) template); @@ -66,22 +60,10 @@ public static ProductVariantSelection deepCopy(@Nullable final ProductVariantSel return com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnly.deepCopy( (com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnly) template); } - if (template instanceof com.commercetools.api.models.product_selection.ProductVariantSelectionInclusion) { - return com.commercetools.api.models.product_selection.ProductVariantSelectionInclusion.deepCopy( - (com.commercetools.api.models.product_selection.ProductVariantSelectionInclusion) template); - } ProductVariantSelectionImpl instance = new ProductVariantSelectionImpl(); return instance; } - /** - * builder for exclusion subtype - * @return builder - */ - public static com.commercetools.api.models.product_selection.ProductVariantSelectionExclusionBuilder exclusionBuilder() { - return com.commercetools.api.models.product_selection.ProductVariantSelectionExclusionBuilder.of(); - } - /** * builder for includeAllExcept subtype * @return builder @@ -98,14 +80,6 @@ public static com.commercetools.api.models.product_selection.ProductVariantSelec return com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnlyBuilder.of(); } - /** - * builder for inclusion subtype - * @return builder - */ - public static com.commercetools.api.models.product_selection.ProductVariantSelectionInclusionBuilder inclusionBuilder() { - return com.commercetools.api.models.product_selection.ProductVariantSelectionInclusionBuilder.of(); - } - /** * accessor map function * @param mapped type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionBuilder.java index 560135bbd02..98578cc518e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionBuilder.java @@ -11,10 +11,6 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantSelectionBuilder { - public com.commercetools.api.models.product_selection.ProductVariantSelectionExclusionBuilder exclusionBuilder() { - return com.commercetools.api.models.product_selection.ProductVariantSelectionExclusionBuilder.of(); - } - public com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExceptBuilder includeAllExceptBuilder() { return com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeAllExceptBuilder.of(); } @@ -23,10 +19,6 @@ public com.commercetools.api.models.product_selection.ProductVariantSelectionInc return com.commercetools.api.models.product_selection.ProductVariantSelectionIncludeOnlyBuilder.of(); } - public com.commercetools.api.models.product_selection.ProductVariantSelectionInclusionBuilder inclusionBuilder() { - return com.commercetools.api.models.product_selection.ProductVariantSelectionInclusionBuilder.of(); - } - /** * factory method for an instance of ProductVariantSelectionBuilder * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusion.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusion.java deleted file mode 100644 index e5b0ecaafda..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusion.java +++ /dev/null @@ -1,143 +0,0 @@ - -package com.commercetools.api.models.product_selection; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

All Product Variants except the explicitly stated SKUs are part of the Product Selection.

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

- *     ProductVariantSelectionExclusion productVariantSelectionExclusion = ProductVariantSelectionExclusion.builder()
- *             .plusSkus(skusBuilder -> skusBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductVariantSelectionExclusionImpl.class) -@Deprecated -public interface ProductVariantSelectionExclusion extends ProductVariantSelection { - - /** - * discriminator value for ProductVariantSelectionExclusion - */ - String EXCLUSION = "exclusion"; - - /** - * - * @return type - */ - @NotNull - @JsonProperty("type") - public ProductVariantSelectionTypeEnum getType(); - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @return skus - */ - @NotNull - @JsonProperty("skus") - public List getSkus(); - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @param skus values to be set - */ - - @JsonIgnore - public void setSkus(final String... skus); - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @param skus values to be set - */ - - public void setSkus(final List skus); - - /** - * factory method - * @return instance of ProductVariantSelectionExclusion - */ - public static ProductVariantSelectionExclusion of() { - return new ProductVariantSelectionExclusionImpl(); - } - - /** - * factory method to create a shallow copy ProductVariantSelectionExclusion - * @param template instance to be copied - * @return copy instance - */ - public static ProductVariantSelectionExclusion of(final ProductVariantSelectionExclusion template) { - ProductVariantSelectionExclusionImpl instance = new ProductVariantSelectionExclusionImpl(); - instance.setSkus(template.getSkus()); - return instance; - } - - /** - * factory method to create a deep copy of ProductVariantSelectionExclusion - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProductVariantSelectionExclusion deepCopy(@Nullable final ProductVariantSelectionExclusion template) { - if (template == null) { - return null; - } - ProductVariantSelectionExclusionImpl instance = new ProductVariantSelectionExclusionImpl(); - instance.setSkus(Optional.ofNullable(template.getSkus()).map(ArrayList::new).orElse(null)); - return instance; - } - - /** - * builder factory method for ProductVariantSelectionExclusion - * @return builder - */ - public static ProductVariantSelectionExclusionBuilder builder() { - return ProductVariantSelectionExclusionBuilder.of(); - } - - /** - * create builder for ProductVariantSelectionExclusion instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductVariantSelectionExclusionBuilder builder(final ProductVariantSelectionExclusion template) { - return ProductVariantSelectionExclusionBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProductVariantSelectionExclusion(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_selection/ProductVariantSelectionExclusionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusionBuilder.java deleted file mode 100644 index 49e01841848..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusionBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ - -package com.commercetools.api.models.product_selection; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductVariantSelectionExclusionBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductVariantSelectionExclusion productVariantSelectionExclusion = ProductVariantSelectionExclusion.builder()
- *             .plusSkus(skusBuilder -> skusBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@Deprecated -public class ProductVariantSelectionExclusionBuilder implements Builder { - - private java.util.List skus; - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionExclusionBuilder skus(final String... skus) { - this.skus = new ArrayList<>(Arrays.asList(skus)); - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionExclusionBuilder skus(final java.util.List skus) { - this.skus = skus; - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionExclusionBuilder plusSkus(final String... skus) { - if (this.skus == null) { - this.skus = new ArrayList<>(); - } - this.skus.addAll(Arrays.asList(skus)); - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- * @return skus - */ - - public java.util.List getSkus() { - return this.skus; - } - - /** - * builds ProductVariantSelectionExclusion with checking for non-null required values - * @return ProductVariantSelectionExclusion - */ - public ProductVariantSelectionExclusion build() { - Objects.requireNonNull(skus, ProductVariantSelectionExclusion.class + ": skus is missing"); - return new ProductVariantSelectionExclusionImpl(skus); - } - - /** - * builds ProductVariantSelectionExclusion without checking for non-null required values - * @return ProductVariantSelectionExclusion - */ - public ProductVariantSelectionExclusion buildUnchecked() { - return new ProductVariantSelectionExclusionImpl(skus); - } - - /** - * factory method for an instance of ProductVariantSelectionExclusionBuilder - * @return builder - */ - public static ProductVariantSelectionExclusionBuilder of() { - return new ProductVariantSelectionExclusionBuilder(); - } - - /** - * create builder for ProductVariantSelectionExclusion instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductVariantSelectionExclusionBuilder of(final ProductVariantSelectionExclusion template) { - ProductVariantSelectionExclusionBuilder builder = new ProductVariantSelectionExclusionBuilder(); - builder.skus = template.getSkus(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusionImpl.java deleted file mode 100644 index 4c27f64bf8d..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionExclusionImpl.java +++ /dev/null @@ -1,86 +0,0 @@ - -package com.commercetools.api.models.product_selection; - -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; - -/** - *

All Product Variants except the explicitly stated SKUs are part of the Product Selection.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@Deprecated -public class ProductVariantSelectionExclusionImpl implements ProductVariantSelectionExclusion, ModelBase { - - private com.commercetools.api.models.product_selection.ProductVariantSelectionTypeEnum type; - - private java.util.List skus; - - /** - * create instance with all properties - */ - @JsonCreator - ProductVariantSelectionExclusionImpl(@JsonProperty("skus") final java.util.List skus) { - this.skus = skus; - this.type = ProductVariantSelectionTypeEnum.findEnum("exclusion"); - } - - /** - * create empty instance - */ - public ProductVariantSelectionExclusionImpl() { - this.type = ProductVariantSelectionTypeEnum.findEnum("exclusion"); - } - - /** - * - */ - - public com.commercetools.api.models.product_selection.ProductVariantSelectionTypeEnum getType() { - return this.type; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection.

- */ - - public java.util.List getSkus() { - return this.skus; - } - - public void setSkus(final String... skus) { - this.skus = new ArrayList<>(Arrays.asList(skus)); - } - - public void setSkus(final java.util.List skus) { - this.skus = skus; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProductVariantSelectionExclusionImpl that = (ProductVariantSelectionExclusionImpl) o; - - return new EqualsBuilder().append(type, that.type).append(skus, that.skus).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(skus).toHashCode(); - } - -} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionBuilder.java deleted file mode 100644 index c727fb62821..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ - -package com.commercetools.api.models.product_selection; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductVariantSelectionInclusionBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductVariantSelectionInclusion productVariantSelectionInclusion = ProductVariantSelectionInclusion.builder()
- *             .plusSkus(skusBuilder -> skusBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@Deprecated -public class ProductVariantSelectionInclusionBuilder implements Builder { - - private java.util.List skus; - - /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionInclusionBuilder skus(final String... skus) { - this.skus = new ArrayList<>(Arrays.asList(skus)); - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionInclusionBuilder skus(final java.util.List skus) { - this.skus = skus; - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

- * @param skus value to be set - * @return Builder - */ - - public ProductVariantSelectionInclusionBuilder plusSkus(final String... skus) { - if (this.skus == null) { - this.skus = new ArrayList<>(); - } - this.skus.addAll(Arrays.asList(skus)); - return this; - } - - /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

- * @return skus - */ - - public java.util.List getSkus() { - return this.skus; - } - - /** - * builds ProductVariantSelectionInclusion with checking for non-null required values - * @return ProductVariantSelectionInclusion - */ - public ProductVariantSelectionInclusion build() { - Objects.requireNonNull(skus, ProductVariantSelectionInclusion.class + ": skus is missing"); - return new ProductVariantSelectionInclusionImpl(skus); - } - - /** - * builds ProductVariantSelectionInclusion without checking for non-null required values - * @return ProductVariantSelectionInclusion - */ - public ProductVariantSelectionInclusion buildUnchecked() { - return new ProductVariantSelectionInclusionImpl(skus); - } - - /** - * factory method for an instance of ProductVariantSelectionInclusionBuilder - * @return builder - */ - public static ProductVariantSelectionInclusionBuilder of() { - return new ProductVariantSelectionInclusionBuilder(); - } - - /** - * create builder for ProductVariantSelectionInclusion instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductVariantSelectionInclusionBuilder of(final ProductVariantSelectionInclusion template) { - ProductVariantSelectionInclusionBuilder builder = new ProductVariantSelectionInclusionBuilder(); - builder.skus = template.getSkus(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionExclusionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionExclusionQueryBuilderDsl.java deleted file mode 100644 index 114b9734063..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionExclusionQueryBuilderDsl.java +++ /dev/null @@ -1,27 +0,0 @@ - -package com.commercetools.api.predicates.query.product_selection; - -import com.commercetools.api.predicates.query.*; - -@Deprecated -public class ProductVariantSelectionExclusionQueryBuilderDsl { - public ProductVariantSelectionExclusionQueryBuilderDsl() { - } - - public static ProductVariantSelectionExclusionQueryBuilderDsl of() { - return new ProductVariantSelectionExclusionQueryBuilderDsl(); - } - - public StringComparisonPredicateBuilder type() { - return new StringComparisonPredicateBuilder<>( - BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), - p -> new CombinationQueryPredicate<>(p, ProductVariantSelectionExclusionQueryBuilderDsl::of)); - } - - public StringCollectionPredicateBuilder skus() { - return new StringCollectionPredicateBuilder<>( - BinaryQueryPredicate.of().left(new ConstantQueryPredicate("skus")), - p -> new CombinationQueryPredicate<>(p, ProductVariantSelectionExclusionQueryBuilderDsl::of)); - } - -} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionInclusionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionInclusionQueryBuilderDsl.java deleted file mode 100644 index 91b1b676dc3..00000000000 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionInclusionQueryBuilderDsl.java +++ /dev/null @@ -1,27 +0,0 @@ - -package com.commercetools.api.predicates.query.product_selection; - -import com.commercetools.api.predicates.query.*; - -@Deprecated -public class ProductVariantSelectionInclusionQueryBuilderDsl { - public ProductVariantSelectionInclusionQueryBuilderDsl() { - } - - public static ProductVariantSelectionInclusionQueryBuilderDsl of() { - return new ProductVariantSelectionInclusionQueryBuilderDsl(); - } - - public StringComparisonPredicateBuilder type() { - return new StringComparisonPredicateBuilder<>( - BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), - p -> new CombinationQueryPredicate<>(p, ProductVariantSelectionInclusionQueryBuilderDsl::of)); - } - - public StringCollectionPredicateBuilder skus() { - return new StringCollectionPredicateBuilder<>( - BinaryQueryPredicate.of().left(new ConstantQueryPredicate("skus")), - p -> new CombinationQueryPredicate<>(p, ProductVariantSelectionInclusionQueryBuilderDsl::of)); - } - -} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionQueryBuilderDsl.java index 26f131723fb..af1302fc29f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_selection/ProductVariantSelectionQueryBuilderDsl.java @@ -19,14 +19,6 @@ public StringComparisonPredicateBuilder p -> new CombinationQueryPredicate<>(p, ProductVariantSelectionQueryBuilderDsl::of)); } - public CombinationQueryPredicate asExclusion( - Function> fn) { - return new CombinationQueryPredicate<>(fn.apply( - com.commercetools.api.predicates.query.product_selection.ProductVariantSelectionExclusionQueryBuilderDsl - .of()), - ProductVariantSelectionQueryBuilderDsl::of); - } - public CombinationQueryPredicate asIncludeAllExcept( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( @@ -42,12 +34,4 @@ public CombinationQueryPredicate asInclu .of()), ProductVariantSelectionQueryBuilderDsl::of); } - - public CombinationQueryPredicate asInclusion( - Function> fn) { - return new CombinationQueryPredicate<>(fn.apply( - com.commercetools.api.predicates.query.product_selection.ProductVariantSelectionInclusionQueryBuilderDsl - .of()), - ProductVariantSelectionQueryBuilderDsl::of); - } } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java index ccceec89a64..28c18626705 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java @@ -111,8 +111,8 @@ public List getClientId() { return this.getQueryParam("clientId"); } - public List getResourceId() { - return this.getQueryParam("resourceId"); + public List getResourceKey() { + return this.getQueryParam("resourceKey"); } public List getSource() { @@ -703,83 +703,83 @@ public ByProjectKeyByResourceTypeGet addClientId(final Collection value type * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet withResourceId(final TValue resourceId) { - return copy().withQueryParam("resourceId", resourceId); + public ByProjectKeyByResourceTypeGet withResourceKey(final TValue resourceKey) { + return copy().withQueryParam("resourceKey", resourceKey); } /** - * add additional resourceId query parameter - * @param resourceId value to be added + * add additional resourceKey query parameter + * @param resourceKey value to be added * @param value type * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet addResourceId(final TValue resourceId) { - return copy().addQueryParam("resourceId", resourceId); + public ByProjectKeyByResourceTypeGet addResourceKey(final TValue resourceKey) { + return copy().addQueryParam("resourceKey", resourceKey); } /** - * set resourceId with the specified value + * set resourceKey with the specified value * @param supplier supplier for the value to be set * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet withResourceId(final Supplier supplier) { - return copy().withQueryParam("resourceId", supplier.get()); + public ByProjectKeyByResourceTypeGet withResourceKey(final Supplier supplier) { + return copy().withQueryParam("resourceKey", supplier.get()); } /** - * add additional resourceId query parameter + * add additional resourceKey query parameter * @param supplier supplier for the value to be added * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet addResourceId(final Supplier supplier) { - return copy().addQueryParam("resourceId", supplier.get()); + public ByProjectKeyByResourceTypeGet addResourceKey(final Supplier supplier) { + return copy().addQueryParam("resourceKey", supplier.get()); } /** - * set resourceId with the specified value + * set resourceKey with the specified value * @param op builder for the value to be set * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet withResourceId(final Function op) { - return copy().withQueryParam("resourceId", op.apply(new StringBuilder())); + public ByProjectKeyByResourceTypeGet withResourceKey(final Function op) { + return copy().withQueryParam("resourceKey", op.apply(new StringBuilder())); } /** - * add additional resourceId query parameter + * add additional resourceKey query parameter * @param op builder for the value to be added * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet addResourceId(final Function op) { - return copy().addQueryParam("resourceId", op.apply(new StringBuilder())); + public ByProjectKeyByResourceTypeGet addResourceKey(final Function op) { + return copy().addQueryParam("resourceKey", op.apply(new StringBuilder())); } /** - * set resourceId with the specified values - * @param resourceId values to be set + * set resourceKey with the specified values + * @param resourceKey values to be set * @param value type * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet withResourceId(final Collection resourceId) { - return copy().withoutQueryParam("resourceId") - .addQueryParams(resourceId.stream() - .map(s -> new ParamEntry<>("resourceId", s.toString())) + public ByProjectKeyByResourceTypeGet withResourceKey(final Collection resourceKey) { + return copy().withoutQueryParam("resourceKey") + .addQueryParams(resourceKey.stream() + .map(s -> new ParamEntry<>("resourceKey", s.toString())) .collect(Collectors.toList())); } /** - * add additional resourceId query parameters - * @param resourceId values to be added + * add additional resourceKey query parameters + * @param resourceKey values to be added * @param value type * @return ByProjectKeyByResourceTypeGet */ - public ByProjectKeyByResourceTypeGet addResourceId(final Collection resourceId) { + public ByProjectKeyByResourceTypeGet addResourceKey(final Collection resourceKey) { return copy().addQueryParams( - resourceId.stream().map(s -> new ParamEntry<>("resourceId", s.toString())).collect(Collectors.toList())); + resourceKey.stream().map(s -> new ParamEntry<>("resourceKey", s.toString())).collect(Collectors.toList())); } /** diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java index a299b5f06ba..a2055d5e53b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java @@ -112,6 +112,10 @@ public List getResourceId() { return this.getQueryParam("resourceId"); } + public List getResourceKey() { + return this.getQueryParam("resourceKey"); + } + public List getSource() { return this.getQueryParam("source"); } @@ -856,6 +860,86 @@ public ByProjectKeyGet addResourceId(final Collection resourceI resourceId.stream().map(s -> new ParamEntry<>("resourceId", s.toString())).collect(Collectors.toList())); } + /** + * set resourceKey with the specified value + * @param resourceKey value to be set + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet withResourceKey(final TValue resourceKey) { + return copy().withQueryParam("resourceKey", resourceKey); + } + + /** + * add additional resourceKey query parameter + * @param resourceKey value to be added + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet addResourceKey(final TValue resourceKey) { + return copy().addQueryParam("resourceKey", resourceKey); + } + + /** + * set resourceKey with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyGet + */ + public ByProjectKeyGet withResourceKey(final Supplier supplier) { + return copy().withQueryParam("resourceKey", supplier.get()); + } + + /** + * add additional resourceKey query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyGet + */ + public ByProjectKeyGet addResourceKey(final Supplier supplier) { + return copy().addQueryParam("resourceKey", supplier.get()); + } + + /** + * set resourceKey with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyGet + */ + public ByProjectKeyGet withResourceKey(final Function op) { + return copy().withQueryParam("resourceKey", op.apply(new StringBuilder())); + } + + /** + * add additional resourceKey query parameter + * @param op builder for the value to be added + * @return ByProjectKeyGet + */ + public ByProjectKeyGet addResourceKey(final Function op) { + return copy().addQueryParam("resourceKey", op.apply(new StringBuilder())); + } + + /** + * set resourceKey with the specified values + * @param resourceKey values to be set + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet withResourceKey(final Collection resourceKey) { + return copy().withoutQueryParam("resourceKey") + .addQueryParams(resourceKey.stream() + .map(s -> new ParamEntry<>("resourceKey", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional resourceKey query parameters + * @param resourceKey values to be added + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet addResourceKey(final Collection resourceKey) { + return copy().addQueryParams( + resourceKey.stream().map(s -> new ParamEntry<>("resourceKey", s.toString())).collect(Collectors.toList())); + } + /** * set source with the specified value * @param source value to be set diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChange.java new file mode 100644 index 00000000000..711e2fcff02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChange.java @@ -0,0 +1,155 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Associate; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Add Associate update action.

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

+ *     AddAssociateChange addAssociateChange = AddAssociateChange.builder()
+ *             .change("{change}")
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddAssociateChangeImpl.class) +public interface AddAssociateChange extends Change { + + /** + * discriminator value for AddAssociateChange + */ + String ADD_ASSOCIATE_CHANGE = "AddAssociateChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public Associate getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final Associate nextValue); + + /** + * factory method + * @return instance of AddAssociateChange + */ + public static AddAssociateChange of() { + return new AddAssociateChangeImpl(); + } + + /** + * factory method to create a shallow copy AddAssociateChange + * @param template instance to be copied + * @return copy instance + */ + public static AddAssociateChange of(final AddAssociateChange template) { + AddAssociateChangeImpl instance = new AddAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of AddAssociateChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddAssociateChange deepCopy(@Nullable final AddAssociateChange template) { + if (template == null) { + return null; + } + AddAssociateChangeImpl instance = new AddAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setNextValue(com.commercetools.history.models.common.Associate.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for AddAssociateChange + * @return builder + */ + public static AddAssociateChangeBuilder builder() { + return AddAssociateChangeBuilder.of(); + } + + /** + * create builder for AddAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddAssociateChangeBuilder builder(final AddAssociateChange template) { + return AddAssociateChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddAssociateChange(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-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeBuilder.java new file mode 100644 index 00000000000..5cdb6d4601e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddAssociateChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AddAssociateChange addAssociateChange = AddAssociateChange.builder()
+ *             .change("{change}")
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddAssociateChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Associate nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public AddAssociateChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public AddAssociateChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build(); + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public AddAssociateChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()); + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public AddAssociateChangeBuilder nextValue(final com.commercetools.history.models.common.Associate nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.Associate getNextValue() { + return this.nextValue; + } + + /** + * builds AddAssociateChange with checking for non-null required values + * @return AddAssociateChange + */ + public AddAssociateChange build() { + Objects.requireNonNull(change, AddAssociateChange.class + ": change is missing"); + Objects.requireNonNull(nextValue, AddAssociateChange.class + ": nextValue is missing"); + return new AddAssociateChangeImpl(change, nextValue); + } + + /** + * builds AddAssociateChange without checking for non-null required values + * @return AddAssociateChange + */ + public AddAssociateChange buildUnchecked() { + return new AddAssociateChangeImpl(change, nextValue); + } + + /** + * factory method for an instance of AddAssociateChangeBuilder + * @return builder + */ + public static AddAssociateChangeBuilder of() { + return new AddAssociateChangeBuilder(); + } + + /** + * create builder for AddAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddAssociateChangeBuilder of(final AddAssociateChange template) { + AddAssociateChangeBuilder builder = new AddAssociateChangeBuilder(); + builder.change = template.getChange(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeImpl.java new file mode 100644 index 00000000000..625992867e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssociateChangeImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Add Associate update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddAssociateChangeImpl implements AddAssociateChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Associate nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + AddAssociateChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("nextValue") final com.commercetools.history.models.common.Associate nextValue) { + this.change = change; + this.nextValue = nextValue; + this.type = ADD_ASSOCIATE_CHANGE; + } + + /** + * create empty instance + */ + public AddAssociateChangeImpl() { + this.type = ADD_ASSOCIATE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.Associate getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setNextValue(final com.commercetools.history.models.common.Associate nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddAssociateChangeImpl that = (AddAssociateChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).append(nextValue).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChange.java index a6392d5cb65..9cb31ef51fa 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChange.java @@ -9,6 +9,7 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; +import com.commercetools.history.models.common.ProductVariantSelection; import com.commercetools.history.models.common.Reference; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -25,6 +26,7 @@ * AddProductChange addProductChange = AddProductChange.builder() * .change("{change}") * .nextValue(nextValueBuilder -> nextValueBuilder) + * .variantSelection(variantSelectionBuilder -> variantSelectionBuilder) * .build() * * @@ -63,6 +65,15 @@ public interface AddProductChange extends Change { @JsonProperty("nextValue") public Reference getNextValue(); + /** + *

The Product Variants included in the Product Selection.

+ * @return variantSelection + */ + @NotNull + @Valid + @JsonProperty("variantSelection") + public ProductVariantSelection getVariantSelection(); + /** * set change * @param change value to be set @@ -77,6 +88,13 @@ public interface AddProductChange extends Change { public void setNextValue(final Reference nextValue); + /** + *

The Product Variants included in the Product Selection.

+ * @param variantSelection value to be set + */ + + public void setVariantSelection(final ProductVariantSelection variantSelection); + /** * factory method * @return instance of AddProductChange @@ -94,6 +112,7 @@ public static AddProductChange of(final AddProductChange template) { AddProductChangeImpl instance = new AddProductChangeImpl(); instance.setChange(template.getChange()); instance.setNextValue(template.getNextValue()); + instance.setVariantSelection(template.getVariantSelection()); return instance; } @@ -110,6 +129,8 @@ public static AddProductChange deepCopy(@Nullable final AddProductChange templat AddProductChangeImpl instance = new AddProductChangeImpl(); instance.setChange(template.getChange()); instance.setNextValue(com.commercetools.history.models.common.Reference.deepCopy(template.getNextValue())); + instance.setVariantSelection( + com.commercetools.history.models.common.ProductVariantSelection.deepCopy(template.getVariantSelection())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeBuilder.java index 972c1ea83b3..afbec015029 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeBuilder.java @@ -16,6 +16,7 @@ * AddProductChange addProductChange = AddProductChange.builder() * .change("{change}") * .nextValue(nextValueBuilder -> nextValueBuilder) + * .variantSelection(variantSelectionBuilder -> variantSelectionBuilder) * .build() * * @@ -27,6 +28,8 @@ public class AddProductChangeBuilder implements Builder { private com.commercetools.history.models.common.Reference nextValue; + private com.commercetools.history.models.common.ProductVariantSelection variantSelection; + /** * set the value to the change * @param change value to be set @@ -73,6 +76,45 @@ public AddProductChangeBuilder nextValue(final com.commercetools.history.models. return this; } + /** + *

The Product Variants included in the Product Selection.

+ * @param builder function to build the variantSelection value + * @return Builder + */ + + public AddProductChangeBuilder variantSelection( + Function builder) { + this.variantSelection = builder + .apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()) + .build(); + return this; + } + + /** + *

The Product Variants included in the Product Selection.

+ * @param builder function to build the variantSelection value + * @return Builder + */ + + public AddProductChangeBuilder withVariantSelection( + Function builder) { + this.variantSelection = builder + .apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()); + return this; + } + + /** + *

The Product Variants included in the Product Selection.

+ * @param variantSelection value to be set + * @return Builder + */ + + public AddProductChangeBuilder variantSelection( + final com.commercetools.history.models.common.ProductVariantSelection variantSelection) { + this.variantSelection = variantSelection; + return this; + } + /** * value of change} * @return change @@ -91,6 +133,15 @@ public com.commercetools.history.models.common.Reference getNextValue() { return this.nextValue; } + /** + *

The Product Variants included in the Product Selection.

+ * @return variantSelection + */ + + public com.commercetools.history.models.common.ProductVariantSelection getVariantSelection() { + return this.variantSelection; + } + /** * builds AddProductChange with checking for non-null required values * @return AddProductChange @@ -98,7 +149,8 @@ public com.commercetools.history.models.common.Reference getNextValue() { public AddProductChange build() { Objects.requireNonNull(change, AddProductChange.class + ": change is missing"); Objects.requireNonNull(nextValue, AddProductChange.class + ": nextValue is missing"); - return new AddProductChangeImpl(change, nextValue); + Objects.requireNonNull(variantSelection, AddProductChange.class + ": variantSelection is missing"); + return new AddProductChangeImpl(change, nextValue, variantSelection); } /** @@ -106,7 +158,7 @@ public AddProductChange build() { * @return AddProductChange */ public AddProductChange buildUnchecked() { - return new AddProductChangeImpl(change, nextValue); + return new AddProductChangeImpl(change, nextValue, variantSelection); } /** @@ -126,6 +178,7 @@ public static AddProductChangeBuilder of(final AddProductChange template) { AddProductChangeBuilder builder = new AddProductChangeBuilder(); builder.change = template.getChange(); builder.nextValue = template.getNextValue(); + builder.variantSelection = template.getVariantSelection(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeImpl.java index 00e3c7ab1d3..54a1d6c217f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeImpl.java @@ -26,14 +26,18 @@ public class AddProductChangeImpl implements AddProductChange, ModelBase { private com.commercetools.history.models.common.Reference nextValue; + private com.commercetools.history.models.common.ProductVariantSelection variantSelection; + /** * create instance with all properties */ @JsonCreator AddProductChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Reference nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.Reference nextValue, + @JsonProperty("variantSelection") final com.commercetools.history.models.common.ProductVariantSelection variantSelection) { this.change = change; this.nextValue = nextValue; + this.variantSelection = variantSelection; this.type = ADD_PRODUCT_CHANGE; } @@ -68,6 +72,14 @@ public com.commercetools.history.models.common.Reference getNextValue() { return this.nextValue; } + /** + *

The Product Variants included in the Product Selection.

+ */ + + public com.commercetools.history.models.common.ProductVariantSelection getVariantSelection() { + return this.variantSelection; + } + public void setChange(final String change) { this.change = change; } @@ -76,6 +88,11 @@ public void setNextValue(final com.commercetools.history.models.common.Reference this.nextValue = nextValue; } + public void setVariantSelection( + final com.commercetools.history.models.common.ProductVariantSelection variantSelection) { + this.variantSelection = variantSelection; + } + @Override public boolean equals(Object o) { if (this == o) @@ -89,12 +106,17 @@ public boolean equals(Object o) { return new EqualsBuilder().append(type, that.type) .append(change, that.change) .append(nextValue, that.nextValue) + .append(variantSelection, that.variantSelection) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(change).append(nextValue).toHashCode(); + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(nextValue) + .append(variantSelection) + .toHashCode(); } } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChange.java new file mode 100644 index 00000000000..502b9093d22 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChange.java @@ -0,0 +1,176 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.ProductSelectionSetting; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Add Product Selection update action.

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

+ *     AddProductSelectionChange addProductSelectionChange = AddProductSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddProductSelectionChangeImpl.class) +public interface AddProductSelectionChange extends Change { + + /** + * discriminator value for AddProductSelectionChange + */ + String ADD_PRODUCT_SELECTION_CHANGE = "AddProductSelectionChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public ProductSelectionSetting getPreviousValue(); + + /** + * + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public ProductSelectionSetting getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + * set previousValue + * @param previousValue value to be set + */ + + public void setPreviousValue(final ProductSelectionSetting previousValue); + + /** + * set nextValue + * @param nextValue value to be set + */ + + public void setNextValue(final ProductSelectionSetting nextValue); + + /** + * factory method + * @return instance of AddProductSelectionChange + */ + public static AddProductSelectionChange of() { + return new AddProductSelectionChangeImpl(); + } + + /** + * factory method to create a shallow copy AddProductSelectionChange + * @param template instance to be copied + * @return copy instance + */ + public static AddProductSelectionChange of(final AddProductSelectionChange template) { + AddProductSelectionChangeImpl instance = new AddProductSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of AddProductSelectionChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddProductSelectionChange deepCopy(@Nullable final AddProductSelectionChange template) { + if (template == null) { + return null; + } + AddProductSelectionChangeImpl instance = new AddProductSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.ProductSelectionSetting.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.ProductSelectionSetting.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for AddProductSelectionChange + * @return builder + */ + public static AddProductSelectionChangeBuilder builder() { + return AddProductSelectionChangeBuilder.of(); + } + + /** + * create builder for AddProductSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddProductSelectionChangeBuilder builder(final AddProductSelectionChange template) { + return AddProductSelectionChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddProductSelectionChange(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-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeBuilder.java new file mode 100644 index 00000000000..611d176e508 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeBuilder.java @@ -0,0 +1,185 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddProductSelectionChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AddProductSelectionChange addProductSelectionChange = AddProductSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddProductSelectionChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ProductSelectionSetting previousValue; + + private com.commercetools.history.models.common.ProductSelectionSetting nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public AddProductSelectionChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + * set the value to the previousValue using the builder function + * @param builder function to build the previousValue value + * @return Builder + */ + + public AddProductSelectionChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()) + .build(); + return this; + } + + /** + * set the value to the previousValue using the builder function + * @param builder function to build the previousValue value + * @return Builder + */ + + public AddProductSelectionChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()); + return this; + } + + /** + * set the value to the previousValue + * @param previousValue value to be set + * @return Builder + */ + + public AddProductSelectionChangeBuilder previousValue( + final com.commercetools.history.models.common.ProductSelectionSetting previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + * set the value to the nextValue using the builder function + * @param builder function to build the nextValue value + * @return Builder + */ + + public AddProductSelectionChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()) + .build(); + return this; + } + + /** + * set the value to the nextValue using the builder function + * @param builder function to build the nextValue value + * @return Builder + */ + + public AddProductSelectionChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()); + return this; + } + + /** + * set the value to the nextValue + * @param nextValue value to be set + * @return Builder + */ + + public AddProductSelectionChangeBuilder nextValue( + final com.commercetools.history.models.common.ProductSelectionSetting nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + * value of previousValue} + * @return previousValue + */ + + public com.commercetools.history.models.common.ProductSelectionSetting getPreviousValue() { + return this.previousValue; + } + + /** + * value of nextValue} + * @return nextValue + */ + + public com.commercetools.history.models.common.ProductSelectionSetting getNextValue() { + return this.nextValue; + } + + /** + * builds AddProductSelectionChange with checking for non-null required values + * @return AddProductSelectionChange + */ + public AddProductSelectionChange build() { + Objects.requireNonNull(change, AddProductSelectionChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, AddProductSelectionChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, AddProductSelectionChange.class + ": nextValue is missing"); + return new AddProductSelectionChangeImpl(change, previousValue, nextValue); + } + + /** + * builds AddProductSelectionChange without checking for non-null required values + * @return AddProductSelectionChange + */ + public AddProductSelectionChange buildUnchecked() { + return new AddProductSelectionChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of AddProductSelectionChangeBuilder + * @return builder + */ + public static AddProductSelectionChangeBuilder of() { + return new AddProductSelectionChangeBuilder(); + } + + /** + * create builder for AddProductSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddProductSelectionChangeBuilder of(final AddProductSelectionChange template) { + AddProductSelectionChangeBuilder builder = new AddProductSelectionChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeImpl.java new file mode 100644 index 00000000000..e2b37f41c48 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductSelectionChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Add Product Selection update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddProductSelectionChangeImpl implements AddProductSelectionChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.ProductSelectionSetting previousValue; + + private com.commercetools.history.models.common.ProductSelectionSetting nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + AddProductSelectionChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.ProductSelectionSetting previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.ProductSelectionSetting nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = ADD_PRODUCT_SELECTION_CHANGE; + } + + /** + * create empty instance + */ + public AddProductSelectionChangeImpl() { + this.type = ADD_PRODUCT_SELECTION_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + * + */ + + public com.commercetools.history.models.common.ProductSelectionSetting getPreviousValue() { + return this.previousValue; + } + + /** + * + */ + + public com.commercetools.history.models.common.ProductSelectionSetting getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ProductSelectionSetting previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.ProductSelectionSetting nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddProductSelectionChangeImpl that = (AddProductSelectionChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/Change.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/Change.java index 5cdfd8e1d13..7c70dbadf87 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/Change.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/Change.java @@ -32,6 +32,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddAddressChangeImpl.class, name = AddAddressChange.ADD_ADDRESS_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddAssetChangeImpl.class, name = AddAssetChange.ADD_ASSET_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddAssociateChangeImpl.class, name = AddAssociateChange.ADD_ASSOCIATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddAttributeDefinitionChangeImpl.class, name = AddAttributeDefinitionChange.ADD_ATTRIBUTE_DEFINITION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddBillingAddressIdChangeImpl.class, name = AddBillingAddressIdChange.ADD_BILLING_ADDRESS_ID_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddChannelRolesChangeImpl.class, name = AddChannelRolesChange.ADD_CHANNEL_ROLES_CHANGE), @@ -51,6 +52,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddPlainEnumValueChangeImpl.class, name = AddPlainEnumValueChange.ADD_PLAIN_ENUM_VALUE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddPriceChangeImpl.class, name = AddPriceChange.ADD_PRICE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddProductChangeImpl.class, name = AddProductChange.ADD_PRODUCT_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddProductSelectionChangeImpl.class, name = AddProductSelectionChange.ADD_PRODUCT_SELECTION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddPropertyChangeImpl.class, name = AddPropertyChange.ADD_PROPERTY_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddReturnInfoChangeImpl.class, name = AddReturnInfoChange.ADD_RETURN_INFO_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.AddShippingAddressIdChangeImpl.class, name = AddShippingAddressIdChange.ADD_SHIPPING_ADDRESS_ID_CHANGE), @@ -66,6 +68,8 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAmountPlannedChangeImpl.class, name = ChangeAmountPlannedChange.CHANGE_AMOUNT_PLANNED_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAssetNameChangeImpl.class, name = ChangeAssetNameChange.CHANGE_ASSET_NAME_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAssetOrderChangeImpl.class, name = ChangeAssetOrderChange.CHANGE_ASSET_ORDER_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAssociateChangeImpl.class, name = ChangeAssociateChange.CHANGE_ASSOCIATE_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAssociateModeChangeImpl.class, name = ChangeAssociateModeChange.CHANGE_ASSOCIATE_MODE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAttributeConstraintChangeImpl.class, name = ChangeAttributeConstraintChange.CHANGE_ATTRIBUTE_CONSTRAINT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeAttributeOrderByNameChangeImpl.class, name = ChangeAttributeOrderByNameChange.CHANGE_ATTRIBUTE_ORDER_BY_NAME_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeCartDiscountsChangeImpl.class, name = ChangeCartDiscountsChange.CHANGE_CART_DISCOUNTS_CHANGE), @@ -93,11 +97,13 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeOrderHintChangeImpl.class, name = ChangeOrderHintChange.CHANGE_ORDER_HINT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeOrderStateChangeImpl.class, name = ChangeOrderStateChange.CHANGE_ORDER_STATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeParentChangeImpl.class, name = ChangeParentChange.CHANGE_PARENT_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeParentUnitChangeImpl.class, name = ChangeParentUnitChange.CHANGE_PARENT_UNIT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangePaymentStateChangeImpl.class, name = ChangePaymentStateChange.CHANGE_PAYMENT_STATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangePlainEnumValueLabelChangeImpl.class, name = ChangePlainEnumValueLabelChange.CHANGE_PLAIN_ENUM_VALUE_LABEL_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangePlainEnumValueOrderChangeImpl.class, name = ChangePlainEnumValueOrderChange.CHANGE_PLAIN_ENUM_VALUE_ORDER_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangePredicateChangeImpl.class, name = ChangePredicateChange.CHANGE_PREDICATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangePriceChangeImpl.class, name = ChangePriceChange.CHANGE_PRICE_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeProductSelectionActiveChangeImpl.class, name = ChangeProductSelectionActiveChange.CHANGE_PRODUCT_SELECTION_ACTIVE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeQuantityChangeImpl.class, name = ChangeQuantityChange.CHANGE_QUANTITY_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeQuoteRequestStateChangeImpl.class, name = ChangeQuoteRequestStateChange.CHANGE_QUOTE_REQUEST_STATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeQuoteStateChangeImpl.class, name = ChangeQuoteStateChange.CHANGE_QUOTE_STATE_CHANGE), @@ -111,6 +117,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeStackingModeChangeImpl.class, name = ChangeStackingModeChange.CHANGE_STACKING_MODE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeStagedQuoteStateChangeImpl.class, name = ChangeStagedQuoteStateChange.CHANGE_STAGED_QUOTE_STATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeStateTypeChangeImpl.class, name = ChangeStateTypeChange.CHANGE_STATE_TYPE_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeStatusChangeImpl.class, name = ChangeStatusChange.CHANGE_STATUS_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeTargetChangeImpl.class, name = ChangeTargetChange.CHANGE_TARGET_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeTaxCalculationModeChangeImpl.class, name = ChangeTaxCalculationModeChange.CHANGE_TAX_CALCULATION_MODE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.ChangeTaxModeChangeImpl.class, name = ChangeTaxModeChange.CHANGE_TAX_MODE_CHANGE), @@ -126,6 +133,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.PublishChangeImpl.class, name = PublishChange.PUBLISH_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveAddressChangeImpl.class, name = RemoveAddressChange.REMOVE_ADDRESS_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveAssetChangeImpl.class, name = RemoveAssetChange.REMOVE_ASSET_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveAssociateChangeImpl.class, name = RemoveAssociateChange.REMOVE_ASSOCIATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveAttributeDefinitionChangeImpl.class, name = RemoveAttributeDefinitionChange.REMOVE_ATTRIBUTE_DEFINITION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveBillingAddressIdChangeImpl.class, name = RemoveBillingAddressIdChange.REMOVE_BILLING_ADDRESS_ID_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveChannelRolesChangeImpl.class, name = RemoveChannelRolesChange.REMOVE_CHANNEL_ROLES_CHANGE), @@ -144,6 +152,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemovePaymentChangeImpl.class, name = RemovePaymentChange.REMOVE_PAYMENT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemovePriceChangeImpl.class, name = RemovePriceChange.REMOVE_PRICE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveProductChangeImpl.class, name = RemoveProductChange.REMOVE_PRODUCT_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveProductSelectionChangeImpl.class, name = RemoveProductSelectionChange.REMOVE_PRODUCT_SELECTION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemovePropertyChangeImpl.class, name = RemovePropertyChange.REMOVE_PROPERTY_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveShippingAddressIdChangeImpl.class, name = RemoveShippingAddressIdChange.REMOVE_SHIPPING_ADDRESS_ID_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveShoppingListLineItemChangeImpl.class, name = RemoveShoppingListLineItemChange.REMOVE_SHOPPING_LIST_LINE_ITEM_CHANGE), @@ -151,7 +160,10 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveTaxRateChangeImpl.class, name = RemoveTaxRateChange.REMOVE_TAX_RATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveTextLineItemChangeImpl.class, name = RemoveTextLineItemChange.REMOVE_TEXT_LINE_ITEM_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.RemoveVariantChangeImpl.class, name = RemoveVariantChange.REMOVE_VARIANT_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.RequestQuoteRenegotiationChangeImpl.class, name = RequestQuoteRenegotiationChange.REQUEST_QUOTE_RENEGOTIATION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetAddressChangeImpl.class, name = SetAddressChange.SET_ADDRESS_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetAddressCustomFieldChangeImpl.class, name = SetAddressCustomFieldChange.SET_ADDRESS_CUSTOM_FIELD_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetAddressCustomTypeChangeImpl.class, name = SetAddressCustomTypeChange.SET_ADDRESS_CUSTOM_TYPE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetAnonymousIdChangeImpl.class, name = SetAnonymousIdChange.SET_ANONYMOUS_ID_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetApplicationVersionChangeImpl.class, name = SetApplicationVersionChange.SET_APPLICATION_VERSION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetAssetCustomFieldChangeImpl.class, name = SetAssetCustomFieldChange.SET_ASSET_CUSTOM_FIELD_CHANGE), @@ -168,6 +180,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetCategoryOrderHintChangeImpl.class, name = SetCategoryOrderHintChange.SET_CATEGORY_ORDER_HINT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetChannelRolesChangeImpl.class, name = SetChannelRolesChange.SET_CHANNEL_ROLES_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetCompanyNameChangeImpl.class, name = SetCompanyNameChange.SET_COMPANY_NAME_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetContactEmailChangeImpl.class, name = SetContactEmailChange.SET_CONTACT_EMAIL_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetCountriesChangeImpl.class, name = SetCountriesChange.SET_COUNTRIES_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetCountryChangeImpl.class, name = SetCountryChange.SET_COUNTRY_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetCustomFieldChangeImpl.class, name = SetCustomFieldChange.SET_CUSTOM_FIELD_CHANGE), @@ -272,6 +285,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetStatusInterfaceCodeChangeImpl.class, name = SetStatusInterfaceCodeChange.SET_STATUS_INTERFACE_CODE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetStatusInterfaceTextChangeImpl.class, name = SetStatusInterfaceTextChange.SET_STATUS_INTERFACE_TEXT_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetStoreChangeImpl.class, name = SetStoreChange.SET_STORE_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetStoreModeChangeImpl.class, name = SetStoreModeChange.SET_STORE_MODE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetStoresChangeImpl.class, name = SetStoresChange.SET_STORES_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetSupplyChannelChangeImpl.class, name = SetSupplyChannelChange.SET_SUPPLY_CHANNEL_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetSupplyChannelsChangeImpl.class, name = SetSupplyChannelsChange.SET_SUPPLY_CHANNELS_CHANGE), @@ -289,6 +303,7 @@ @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetValidUntilChangeImpl.class, name = SetValidUntilChange.SET_VALID_UNTIL_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetValueChangeImpl.class, name = SetValueChange.SET_VALUE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetVariantAvailabilityChangeImpl.class, name = SetVariantAvailabilityChange.SET_VARIANT_AVAILABILITY_CHANGE), + @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetVariantSelectionChangeImpl.class, name = SetVariantSelectionChange.SET_VARIANT_SELECTION_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.SetVatIdChangeImpl.class, name = SetVatIdChange.SET_VAT_ID_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.TransitionCustomLineItemStateChangeImpl.class, name = TransitionCustomLineItemStateChange.TRANSITION_CUSTOM_LINE_ITEM_STATE_CHANGE), @JsonSubTypes.Type(value = com.commercetools.history.models.change.TransitionLineItemStateChangeImpl.class, name = TransitionLineItemStateChange.TRANSITION_LINE_ITEM_STATE_CHANGE), @@ -345,6 +360,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.AddAssetChange .deepCopy((com.commercetools.history.models.change.AddAssetChange) template); } + if (template instanceof com.commercetools.history.models.change.AddAssociateChange) { + return com.commercetools.history.models.change.AddAssociateChange + .deepCopy((com.commercetools.history.models.change.AddAssociateChange) template); + } if (template instanceof com.commercetools.history.models.change.AddAttributeDefinitionChange) { return com.commercetools.history.models.change.AddAttributeDefinitionChange .deepCopy((com.commercetools.history.models.change.AddAttributeDefinitionChange) template); @@ -421,6 +440,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.AddProductChange .deepCopy((com.commercetools.history.models.change.AddProductChange) template); } + if (template instanceof com.commercetools.history.models.change.AddProductSelectionChange) { + return com.commercetools.history.models.change.AddProductSelectionChange + .deepCopy((com.commercetools.history.models.change.AddProductSelectionChange) template); + } if (template instanceof com.commercetools.history.models.change.AddPropertyChange) { return com.commercetools.history.models.change.AddPropertyChange .deepCopy((com.commercetools.history.models.change.AddPropertyChange) template); @@ -481,6 +504,14 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.ChangeAssetOrderChange .deepCopy((com.commercetools.history.models.change.ChangeAssetOrderChange) template); } + if (template instanceof com.commercetools.history.models.change.ChangeAssociateChange) { + return com.commercetools.history.models.change.ChangeAssociateChange + .deepCopy((com.commercetools.history.models.change.ChangeAssociateChange) template); + } + if (template instanceof com.commercetools.history.models.change.ChangeAssociateModeChange) { + return com.commercetools.history.models.change.ChangeAssociateModeChange + .deepCopy((com.commercetools.history.models.change.ChangeAssociateModeChange) template); + } if (template instanceof com.commercetools.history.models.change.ChangeAttributeConstraintChange) { return com.commercetools.history.models.change.ChangeAttributeConstraintChange .deepCopy((com.commercetools.history.models.change.ChangeAttributeConstraintChange) template); @@ -589,6 +620,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.ChangeParentChange .deepCopy((com.commercetools.history.models.change.ChangeParentChange) template); } + if (template instanceof com.commercetools.history.models.change.ChangeParentUnitChange) { + return com.commercetools.history.models.change.ChangeParentUnitChange + .deepCopy((com.commercetools.history.models.change.ChangeParentUnitChange) template); + } if (template instanceof com.commercetools.history.models.change.ChangePaymentStateChange) { return com.commercetools.history.models.change.ChangePaymentStateChange .deepCopy((com.commercetools.history.models.change.ChangePaymentStateChange) template); @@ -609,6 +644,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.ChangePriceChange .deepCopy((com.commercetools.history.models.change.ChangePriceChange) template); } + if (template instanceof com.commercetools.history.models.change.ChangeProductSelectionActiveChange) { + return com.commercetools.history.models.change.ChangeProductSelectionActiveChange + .deepCopy((com.commercetools.history.models.change.ChangeProductSelectionActiveChange) template); + } if (template instanceof com.commercetools.history.models.change.ChangeQuantityChange) { return com.commercetools.history.models.change.ChangeQuantityChange .deepCopy((com.commercetools.history.models.change.ChangeQuantityChange) template); @@ -661,6 +700,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.ChangeStateTypeChange .deepCopy((com.commercetools.history.models.change.ChangeStateTypeChange) template); } + if (template instanceof com.commercetools.history.models.change.ChangeStatusChange) { + return com.commercetools.history.models.change.ChangeStatusChange + .deepCopy((com.commercetools.history.models.change.ChangeStatusChange) template); + } if (template instanceof com.commercetools.history.models.change.ChangeTargetChange) { return com.commercetools.history.models.change.ChangeTargetChange .deepCopy((com.commercetools.history.models.change.ChangeTargetChange) template); @@ -721,6 +764,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.RemoveAssetChange .deepCopy((com.commercetools.history.models.change.RemoveAssetChange) template); } + if (template instanceof com.commercetools.history.models.change.RemoveAssociateChange) { + return com.commercetools.history.models.change.RemoveAssociateChange + .deepCopy((com.commercetools.history.models.change.RemoveAssociateChange) template); + } if (template instanceof com.commercetools.history.models.change.RemoveAttributeDefinitionChange) { return com.commercetools.history.models.change.RemoveAttributeDefinitionChange .deepCopy((com.commercetools.history.models.change.RemoveAttributeDefinitionChange) template); @@ -793,6 +840,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.RemoveProductChange .deepCopy((com.commercetools.history.models.change.RemoveProductChange) template); } + if (template instanceof com.commercetools.history.models.change.RemoveProductSelectionChange) { + return com.commercetools.history.models.change.RemoveProductSelectionChange + .deepCopy((com.commercetools.history.models.change.RemoveProductSelectionChange) template); + } if (template instanceof com.commercetools.history.models.change.RemovePropertyChange) { return com.commercetools.history.models.change.RemovePropertyChange .deepCopy((com.commercetools.history.models.change.RemovePropertyChange) template); @@ -821,10 +872,22 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.RemoveVariantChange .deepCopy((com.commercetools.history.models.change.RemoveVariantChange) template); } + if (template instanceof com.commercetools.history.models.change.RequestQuoteRenegotiationChange) { + return com.commercetools.history.models.change.RequestQuoteRenegotiationChange + .deepCopy((com.commercetools.history.models.change.RequestQuoteRenegotiationChange) template); + } if (template instanceof com.commercetools.history.models.change.SetAddressChange) { return com.commercetools.history.models.change.SetAddressChange .deepCopy((com.commercetools.history.models.change.SetAddressChange) template); } + if (template instanceof com.commercetools.history.models.change.SetAddressCustomFieldChange) { + return com.commercetools.history.models.change.SetAddressCustomFieldChange + .deepCopy((com.commercetools.history.models.change.SetAddressCustomFieldChange) template); + } + if (template instanceof com.commercetools.history.models.change.SetAddressCustomTypeChange) { + return com.commercetools.history.models.change.SetAddressCustomTypeChange + .deepCopy((com.commercetools.history.models.change.SetAddressCustomTypeChange) template); + } if (template instanceof com.commercetools.history.models.change.SetAnonymousIdChange) { return com.commercetools.history.models.change.SetAnonymousIdChange .deepCopy((com.commercetools.history.models.change.SetAnonymousIdChange) template); @@ -889,6 +952,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.SetCompanyNameChange .deepCopy((com.commercetools.history.models.change.SetCompanyNameChange) template); } + if (template instanceof com.commercetools.history.models.change.SetContactEmailChange) { + return com.commercetools.history.models.change.SetContactEmailChange + .deepCopy((com.commercetools.history.models.change.SetContactEmailChange) template); + } if (template instanceof com.commercetools.history.models.change.SetCountriesChange) { return com.commercetools.history.models.change.SetCountriesChange .deepCopy((com.commercetools.history.models.change.SetCountriesChange) template); @@ -1305,6 +1372,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.SetStoreChange .deepCopy((com.commercetools.history.models.change.SetStoreChange) template); } + if (template instanceof com.commercetools.history.models.change.SetStoreModeChange) { + return com.commercetools.history.models.change.SetStoreModeChange + .deepCopy((com.commercetools.history.models.change.SetStoreModeChange) template); + } if (template instanceof com.commercetools.history.models.change.SetStoresChange) { return com.commercetools.history.models.change.SetStoresChange .deepCopy((com.commercetools.history.models.change.SetStoresChange) template); @@ -1373,6 +1444,10 @@ public static Change deepCopy(@Nullable final Change template) { return com.commercetools.history.models.change.SetVariantAvailabilityChange .deepCopy((com.commercetools.history.models.change.SetVariantAvailabilityChange) template); } + if (template instanceof com.commercetools.history.models.change.SetVariantSelectionChange) { + return com.commercetools.history.models.change.SetVariantSelectionChange + .deepCopy((com.commercetools.history.models.change.SetVariantSelectionChange) template); + } if (template instanceof com.commercetools.history.models.change.SetVatIdChange) { return com.commercetools.history.models.change.SetVatIdChange .deepCopy((com.commercetools.history.models.change.SetVatIdChange) template); @@ -1426,6 +1501,14 @@ public static com.commercetools.history.models.change.AddAssetChangeBuilder addA return com.commercetools.history.models.change.AddAssetChangeBuilder.of(); } + /** + * builder for addAssociateChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.AddAssociateChangeBuilder addAssociateChangeBuilder() { + return com.commercetools.history.models.change.AddAssociateChangeBuilder.of(); + } + /** * builder for addAttributeDefinitionChange subtype * @return builder @@ -1578,6 +1661,14 @@ public static com.commercetools.history.models.change.AddProductChangeBuilder ad return com.commercetools.history.models.change.AddProductChangeBuilder.of(); } + /** + * builder for addProductSelectionChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.AddProductSelectionChangeBuilder addProductSelectionChangeBuilder() { + return com.commercetools.history.models.change.AddProductSelectionChangeBuilder.of(); + } + /** * builder for addPropertyChange subtype * @return builder @@ -1698,6 +1789,22 @@ public static com.commercetools.history.models.change.ChangeAssetOrderChangeBuil return com.commercetools.history.models.change.ChangeAssetOrderChangeBuilder.of(); } + /** + * builder for changeAssociateChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeAssociateChangeBuilder changeAssociateChangeBuilder() { + return com.commercetools.history.models.change.ChangeAssociateChangeBuilder.of(); + } + + /** + * builder for changeAssociateModeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeAssociateModeChangeBuilder changeAssociateModeChangeBuilder() { + return com.commercetools.history.models.change.ChangeAssociateModeChangeBuilder.of(); + } + /** * builder for changeAttributeConstraintChange subtype * @return builder @@ -1914,6 +2021,14 @@ public static com.commercetools.history.models.change.ChangeParentChangeBuilder return com.commercetools.history.models.change.ChangeParentChangeBuilder.of(); } + /** + * builder for changeParentUnitChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeParentUnitChangeBuilder changeParentUnitChangeBuilder() { + return com.commercetools.history.models.change.ChangeParentUnitChangeBuilder.of(); + } + /** * builder for changePaymentStateChange subtype * @return builder @@ -1954,6 +2069,14 @@ public static com.commercetools.history.models.change.ChangePriceChangeBuilder c return com.commercetools.history.models.change.ChangePriceChangeBuilder.of(); } + /** + * builder for changeProductSelectionActiveChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeProductSelectionActiveChangeBuilder changeProductSelectionActiveChangeBuilder() { + return com.commercetools.history.models.change.ChangeProductSelectionActiveChangeBuilder.of(); + } + /** * builder for changeQuantityChange subtype * @return builder @@ -2058,6 +2181,14 @@ public static com.commercetools.history.models.change.ChangeStateTypeChangeBuild return com.commercetools.history.models.change.ChangeStateTypeChangeBuilder.of(); } + /** + * builder for changeStatusChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeStatusChangeBuilder changeStatusChangeBuilder() { + return com.commercetools.history.models.change.ChangeStatusChangeBuilder.of(); + } + /** * builder for changeTargetChange subtype * @return builder @@ -2178,6 +2309,14 @@ public static com.commercetools.history.models.change.RemoveAssetChangeBuilder r return com.commercetools.history.models.change.RemoveAssetChangeBuilder.of(); } + /** + * builder for removeAssociateChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RemoveAssociateChangeBuilder removeAssociateChangeBuilder() { + return com.commercetools.history.models.change.RemoveAssociateChangeBuilder.of(); + } + /** * builder for removeAttributeDefinitionChange subtype * @return builder @@ -2322,6 +2461,14 @@ public static com.commercetools.history.models.change.RemoveProductChangeBuilder return com.commercetools.history.models.change.RemoveProductChangeBuilder.of(); } + /** + * builder for removeProductSelectionChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RemoveProductSelectionChangeBuilder removeProductSelectionChangeBuilder() { + return com.commercetools.history.models.change.RemoveProductSelectionChangeBuilder.of(); + } + /** * builder for removePropertyChange subtype * @return builder @@ -2378,6 +2525,14 @@ public static com.commercetools.history.models.change.RemoveVariantChangeBuilder return com.commercetools.history.models.change.RemoveVariantChangeBuilder.of(); } + /** + * builder for requestQuoteRenegotiationChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RequestQuoteRenegotiationChangeBuilder requestQuoteRenegotiationChangeBuilder() { + return com.commercetools.history.models.change.RequestQuoteRenegotiationChangeBuilder.of(); + } + /** * builder for setAddressChange subtype * @return builder @@ -2386,6 +2541,22 @@ public static com.commercetools.history.models.change.SetAddressChangeBuilder se return com.commercetools.history.models.change.SetAddressChangeBuilder.of(); } + /** + * builder for setAddressCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetAddressCustomFieldChangeBuilder setAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetAddressCustomFieldChangeBuilder.of(); + } + + /** + * builder for setAddressCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetAddressCustomTypeChangeBuilder setAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetAddressCustomTypeChangeBuilder.of(); + } + /** * builder for setAnonymousIdChange subtype * @return builder @@ -2514,6 +2685,14 @@ public static com.commercetools.history.models.change.SetCompanyNameChangeBuilde return com.commercetools.history.models.change.SetCompanyNameChangeBuilder.of(); } + /** + * builder for setContactEmailChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetContactEmailChangeBuilder setContactEmailChangeBuilder() { + return com.commercetools.history.models.change.SetContactEmailChangeBuilder.of(); + } + /** * builder for setCountriesChange subtype * @return builder @@ -3346,6 +3525,14 @@ public static com.commercetools.history.models.change.SetStoreChangeBuilder setS return com.commercetools.history.models.change.SetStoreChangeBuilder.of(); } + /** + * builder for setStoreModeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetStoreModeChangeBuilder setStoreModeChangeBuilder() { + return com.commercetools.history.models.change.SetStoreModeChangeBuilder.of(); + } + /** * builder for setStoresChange subtype * @return builder @@ -3482,6 +3669,14 @@ public static com.commercetools.history.models.change.SetVariantAvailabilityChan return com.commercetools.history.models.change.SetVariantAvailabilityChangeBuilder.of(); } + /** + * builder for setVariantSelectionChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetVariantSelectionChangeBuilder setVariantSelectionChangeBuilder() { + return com.commercetools.history.models.change.SetVariantSelectionChangeBuilder.of(); + } + /** * builder for setVatIdChange subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChange.java new file mode 100644 index 00000000000..cf4d55be2d7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChange.java @@ -0,0 +1,175 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Associate; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Change Associate update action.

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

+ *     ChangeAssociateChange changeAssociateChange = ChangeAssociateChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeAssociateChangeImpl.class) +public interface ChangeAssociateChange extends Change { + + /** + * discriminator value for ChangeAssociateChange + */ + String CHANGE_ASSOCIATE_CHANGE = "ChangeAssociateChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public Associate getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public Associate getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final Associate previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final Associate nextValue); + + /** + * factory method + * @return instance of ChangeAssociateChange + */ + public static ChangeAssociateChange of() { + return new ChangeAssociateChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeAssociateChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeAssociateChange of(final ChangeAssociateChange template) { + ChangeAssociateChangeImpl instance = new ChangeAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of ChangeAssociateChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeAssociateChange deepCopy(@Nullable final ChangeAssociateChange template) { + if (template == null) { + return null; + } + ChangeAssociateChangeImpl instance = new ChangeAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.Associate.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.Associate.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ChangeAssociateChange + * @return builder + */ + public static ChangeAssociateChangeBuilder builder() { + return ChangeAssociateChangeBuilder.of(); + } + + /** + * create builder for ChangeAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeAssociateChangeBuilder builder(final ChangeAssociateChange template) { + return ChangeAssociateChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeAssociateChange(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-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeBuilder.java new file mode 100644 index 00000000000..b8678ec4052 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeBuilder.java @@ -0,0 +1,182 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChangeAssociateChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ChangeAssociateChange changeAssociateChange = ChangeAssociateChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeAssociateChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Associate previousValue; + + private com.commercetools.history.models.common.Associate nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeAssociateChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public ChangeAssociateChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public ChangeAssociateChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public ChangeAssociateChangeBuilder previousValue( + final com.commercetools.history.models.common.Associate previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeAssociateChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build(); + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeAssociateChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()); + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public ChangeAssociateChangeBuilder nextValue(final com.commercetools.history.models.common.Associate nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.Associate getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.Associate getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeAssociateChange with checking for non-null required values + * @return ChangeAssociateChange + */ + public ChangeAssociateChange build() { + Objects.requireNonNull(change, ChangeAssociateChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeAssociateChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeAssociateChange.class + ": nextValue is missing"); + return new ChangeAssociateChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeAssociateChange without checking for non-null required values + * @return ChangeAssociateChange + */ + public ChangeAssociateChange buildUnchecked() { + return new ChangeAssociateChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeAssociateChangeBuilder + * @return builder + */ + public static ChangeAssociateChangeBuilder of() { + return new ChangeAssociateChangeBuilder(); + } + + /** + * create builder for ChangeAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeAssociateChangeBuilder of(final ChangeAssociateChange template) { + ChangeAssociateChangeBuilder builder = new ChangeAssociateChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeImpl.java new file mode 100644 index 00000000000..355277d0910 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Change Associate update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeAssociateChangeImpl implements ChangeAssociateChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Associate previousValue; + + private com.commercetools.history.models.common.Associate nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + ChangeAssociateChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.Associate previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.Associate nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = CHANGE_ASSOCIATE_CHANGE; + } + + /** + * create empty instance + */ + public ChangeAssociateChangeImpl() { + this.type = CHANGE_ASSOCIATE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.Associate getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.Associate getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Associate previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Associate nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeAssociateChangeImpl that = (ChangeAssociateChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChange.java new file mode 100644 index 00000000000..5b9e76b9891 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChange.java @@ -0,0 +1,171 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.BusinessUnitAssociateMode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Change Associate Mode update action.

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

+ *     ChangeAssociateModeChange changeAssociateModeChange = ChangeAssociateModeChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitAssociateMode.EXPLICIT)
+ *             .nextValue(BusinessUnitAssociateMode.EXPLICIT)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeAssociateModeChangeImpl.class) +public interface ChangeAssociateModeChange extends Change { + + /** + * discriminator value for ChangeAssociateModeChange + */ + String CHANGE_ASSOCIATE_MODE_CHANGE = "ChangeAssociateModeChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public BusinessUnitAssociateMode getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public BusinessUnitAssociateMode getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final BusinessUnitAssociateMode previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final BusinessUnitAssociateMode nextValue); + + /** + * factory method + * @return instance of ChangeAssociateModeChange + */ + public static ChangeAssociateModeChange of() { + return new ChangeAssociateModeChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeAssociateModeChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeAssociateModeChange of(final ChangeAssociateModeChange template) { + ChangeAssociateModeChangeImpl instance = new ChangeAssociateModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of ChangeAssociateModeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeAssociateModeChange deepCopy(@Nullable final ChangeAssociateModeChange template) { + if (template == null) { + return null; + } + ChangeAssociateModeChangeImpl instance = new ChangeAssociateModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeAssociateModeChange + * @return builder + */ + public static ChangeAssociateModeChangeBuilder builder() { + return ChangeAssociateModeChangeBuilder.of(); + } + + /** + * create builder for ChangeAssociateModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeAssociateModeChangeBuilder builder(final ChangeAssociateModeChange template) { + return ChangeAssociateModeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeAssociateModeChange(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-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeBuilder.java new file mode 100644 index 00000000000..e879a2a2d30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChangeAssociateModeChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ChangeAssociateModeChange changeAssociateModeChange = ChangeAssociateModeChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitAssociateMode.EXPLICIT)
+ *             .nextValue(BusinessUnitAssociateMode.EXPLICIT)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeAssociateModeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.BusinessUnitAssociateMode previousValue; + + private com.commercetools.history.models.common.BusinessUnitAssociateMode nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeAssociateModeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public ChangeAssociateModeChangeBuilder previousValue( + final com.commercetools.history.models.common.BusinessUnitAssociateMode previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public ChangeAssociateModeChangeBuilder nextValue( + final com.commercetools.history.models.common.BusinessUnitAssociateMode nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.BusinessUnitAssociateMode getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.BusinessUnitAssociateMode getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeAssociateModeChange with checking for non-null required values + * @return ChangeAssociateModeChange + */ + public ChangeAssociateModeChange build() { + Objects.requireNonNull(change, ChangeAssociateModeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeAssociateModeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeAssociateModeChange.class + ": nextValue is missing"); + return new ChangeAssociateModeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeAssociateModeChange without checking for non-null required values + * @return ChangeAssociateModeChange + */ + public ChangeAssociateModeChange buildUnchecked() { + return new ChangeAssociateModeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeAssociateModeChangeBuilder + * @return builder + */ + public static ChangeAssociateModeChangeBuilder of() { + return new ChangeAssociateModeChangeBuilder(); + } + + /** + * create builder for ChangeAssociateModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeAssociateModeChangeBuilder of(final ChangeAssociateModeChange template) { + ChangeAssociateModeChangeBuilder builder = new ChangeAssociateModeChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeImpl.java new file mode 100644 index 00000000000..a025fe3185a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssociateModeChangeImpl.java @@ -0,0 +1,122 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Change Associate Mode update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeAssociateModeChangeImpl implements ChangeAssociateModeChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.BusinessUnitAssociateMode previousValue; + + private com.commercetools.history.models.common.BusinessUnitAssociateMode nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + ChangeAssociateModeChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.BusinessUnitAssociateMode previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.BusinessUnitAssociateMode nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = CHANGE_ASSOCIATE_MODE_CHANGE; + } + + /** + * create empty instance + */ + public ChangeAssociateModeChangeImpl() { + this.type = CHANGE_ASSOCIATE_MODE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitAssociateMode getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitAssociateMode getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue( + final com.commercetools.history.models.common.BusinessUnitAssociateMode previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.BusinessUnitAssociateMode nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeAssociateModeChangeImpl that = (ChangeAssociateModeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeBuilder.java index 7fe025e8c36..150382b9f23 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeBuilder.java @@ -19,6 +19,10 @@ public com.commercetools.history.models.change.AddAssetChangeBuilder addAssetCha return com.commercetools.history.models.change.AddAssetChangeBuilder.of(); } + public com.commercetools.history.models.change.AddAssociateChangeBuilder addAssociateChangeBuilder() { + return com.commercetools.history.models.change.AddAssociateChangeBuilder.of(); + } + public com.commercetools.history.models.change.AddAttributeDefinitionChangeBuilder addAttributeDefinitionChangeBuilder() { return com.commercetools.history.models.change.AddAttributeDefinitionChangeBuilder.of(); } @@ -95,6 +99,10 @@ public com.commercetools.history.models.change.AddProductChangeBuilder addProduc return com.commercetools.history.models.change.AddProductChangeBuilder.of(); } + public com.commercetools.history.models.change.AddProductSelectionChangeBuilder addProductSelectionChangeBuilder() { + return com.commercetools.history.models.change.AddProductSelectionChangeBuilder.of(); + } + public com.commercetools.history.models.change.AddPropertyChangeBuilder addPropertyChangeBuilder() { return com.commercetools.history.models.change.AddPropertyChangeBuilder.of(); } @@ -155,6 +163,14 @@ public com.commercetools.history.models.change.ChangeAssetOrderChangeBuilder cha return com.commercetools.history.models.change.ChangeAssetOrderChangeBuilder.of(); } + public com.commercetools.history.models.change.ChangeAssociateChangeBuilder changeAssociateChangeBuilder() { + return com.commercetools.history.models.change.ChangeAssociateChangeBuilder.of(); + } + + public com.commercetools.history.models.change.ChangeAssociateModeChangeBuilder changeAssociateModeChangeBuilder() { + return com.commercetools.history.models.change.ChangeAssociateModeChangeBuilder.of(); + } + public com.commercetools.history.models.change.ChangeAttributeConstraintChangeBuilder changeAttributeConstraintChangeBuilder() { return com.commercetools.history.models.change.ChangeAttributeConstraintChangeBuilder.of(); } @@ -263,6 +279,10 @@ public com.commercetools.history.models.change.ChangeParentChangeBuilder changeP return com.commercetools.history.models.change.ChangeParentChangeBuilder.of(); } + public com.commercetools.history.models.change.ChangeParentUnitChangeBuilder changeParentUnitChangeBuilder() { + return com.commercetools.history.models.change.ChangeParentUnitChangeBuilder.of(); + } + public com.commercetools.history.models.change.ChangePaymentStateChangeBuilder changePaymentStateChangeBuilder() { return com.commercetools.history.models.change.ChangePaymentStateChangeBuilder.of(); } @@ -283,6 +303,10 @@ public com.commercetools.history.models.change.ChangePriceChangeBuilder changePr return com.commercetools.history.models.change.ChangePriceChangeBuilder.of(); } + public com.commercetools.history.models.change.ChangeProductSelectionActiveChangeBuilder changeProductSelectionActiveChangeBuilder() { + return com.commercetools.history.models.change.ChangeProductSelectionActiveChangeBuilder.of(); + } + public com.commercetools.history.models.change.ChangeQuantityChangeBuilder changeQuantityChangeBuilder() { return com.commercetools.history.models.change.ChangeQuantityChangeBuilder.of(); } @@ -335,6 +359,10 @@ public com.commercetools.history.models.change.ChangeStateTypeChangeBuilder chan return com.commercetools.history.models.change.ChangeStateTypeChangeBuilder.of(); } + public com.commercetools.history.models.change.ChangeStatusChangeBuilder changeStatusChangeBuilder() { + return com.commercetools.history.models.change.ChangeStatusChangeBuilder.of(); + } + public com.commercetools.history.models.change.ChangeTargetChangeBuilder changeTargetChangeBuilder() { return com.commercetools.history.models.change.ChangeTargetChangeBuilder.of(); } @@ -395,6 +423,10 @@ public com.commercetools.history.models.change.RemoveAssetChangeBuilder removeAs return com.commercetools.history.models.change.RemoveAssetChangeBuilder.of(); } + public com.commercetools.history.models.change.RemoveAssociateChangeBuilder removeAssociateChangeBuilder() { + return com.commercetools.history.models.change.RemoveAssociateChangeBuilder.of(); + } + public com.commercetools.history.models.change.RemoveAttributeDefinitionChangeBuilder removeAttributeDefinitionChangeBuilder() { return com.commercetools.history.models.change.RemoveAttributeDefinitionChangeBuilder.of(); } @@ -467,6 +499,10 @@ public com.commercetools.history.models.change.RemoveProductChangeBuilder remove return com.commercetools.history.models.change.RemoveProductChangeBuilder.of(); } + public com.commercetools.history.models.change.RemoveProductSelectionChangeBuilder removeProductSelectionChangeBuilder() { + return com.commercetools.history.models.change.RemoveProductSelectionChangeBuilder.of(); + } + public com.commercetools.history.models.change.RemovePropertyChangeBuilder removePropertyChangeBuilder() { return com.commercetools.history.models.change.RemovePropertyChangeBuilder.of(); } @@ -495,10 +531,22 @@ public com.commercetools.history.models.change.RemoveVariantChangeBuilder remove return com.commercetools.history.models.change.RemoveVariantChangeBuilder.of(); } + public com.commercetools.history.models.change.RequestQuoteRenegotiationChangeBuilder requestQuoteRenegotiationChangeBuilder() { + return com.commercetools.history.models.change.RequestQuoteRenegotiationChangeBuilder.of(); + } + public com.commercetools.history.models.change.SetAddressChangeBuilder setAddressChangeBuilder() { return com.commercetools.history.models.change.SetAddressChangeBuilder.of(); } + public com.commercetools.history.models.change.SetAddressCustomFieldChangeBuilder setAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetAddressCustomFieldChangeBuilder.of(); + } + + public com.commercetools.history.models.change.SetAddressCustomTypeChangeBuilder setAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetAddressCustomTypeChangeBuilder.of(); + } + public com.commercetools.history.models.change.SetAnonymousIdChangeBuilder setAnonymousIdChangeBuilder() { return com.commercetools.history.models.change.SetAnonymousIdChangeBuilder.of(); } @@ -563,6 +611,10 @@ public com.commercetools.history.models.change.SetCompanyNameChangeBuilder setCo return com.commercetools.history.models.change.SetCompanyNameChangeBuilder.of(); } + public com.commercetools.history.models.change.SetContactEmailChangeBuilder setContactEmailChangeBuilder() { + return com.commercetools.history.models.change.SetContactEmailChangeBuilder.of(); + } + public com.commercetools.history.models.change.SetCountriesChangeBuilder setCountriesChangeBuilder() { return com.commercetools.history.models.change.SetCountriesChangeBuilder.of(); } @@ -979,6 +1031,10 @@ public com.commercetools.history.models.change.SetStoreChangeBuilder setStoreCha return com.commercetools.history.models.change.SetStoreChangeBuilder.of(); } + public com.commercetools.history.models.change.SetStoreModeChangeBuilder setStoreModeChangeBuilder() { + return com.commercetools.history.models.change.SetStoreModeChangeBuilder.of(); + } + public com.commercetools.history.models.change.SetStoresChangeBuilder setStoresChangeBuilder() { return com.commercetools.history.models.change.SetStoresChangeBuilder.of(); } @@ -1047,6 +1103,10 @@ public com.commercetools.history.models.change.SetVariantAvailabilityChangeBuild return com.commercetools.history.models.change.SetVariantAvailabilityChangeBuilder.of(); } + public com.commercetools.history.models.change.SetVariantSelectionChangeBuilder setVariantSelectionChangeBuilder() { + return com.commercetools.history.models.change.SetVariantSelectionChangeBuilder.of(); + } + public com.commercetools.history.models.change.SetVatIdChangeBuilder setVatIdChangeBuilder() { return com.commercetools.history.models.change.SetVatIdChangeBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChange.java new file mode 100644 index 00000000000..304703479a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChange.java @@ -0,0 +1,175 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.KeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Change Parent Unit update action.

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

+ *     ChangeParentUnitChange changeParentUnitChange = ChangeParentUnitChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeParentUnitChangeImpl.class) +public interface ChangeParentUnitChange extends Change { + + /** + * discriminator value for ChangeParentUnitChange + */ + String CHANGE_PARENT_UNIT_CHANGE = "ChangeParentUnitChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public KeyReference getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public KeyReference getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final KeyReference previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final KeyReference nextValue); + + /** + * factory method + * @return instance of ChangeParentUnitChange + */ + public static ChangeParentUnitChange of() { + return new ChangeParentUnitChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeParentUnitChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeParentUnitChange of(final ChangeParentUnitChange template) { + ChangeParentUnitChangeImpl instance = new ChangeParentUnitChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of ChangeParentUnitChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeParentUnitChange deepCopy(@Nullable final ChangeParentUnitChange template) { + if (template == null) { + return null; + } + ChangeParentUnitChangeImpl instance = new ChangeParentUnitChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.KeyReference.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.KeyReference.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ChangeParentUnitChange + * @return builder + */ + public static ChangeParentUnitChangeBuilder builder() { + return ChangeParentUnitChangeBuilder.of(); + } + + /** + * create builder for ChangeParentUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeParentUnitChangeBuilder builder(final ChangeParentUnitChange template) { + return ChangeParentUnitChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeParentUnitChange(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-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeBuilder.java new file mode 100644 index 00000000000..28bf06b76e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeBuilder.java @@ -0,0 +1,183 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChangeParentUnitChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ChangeParentUnitChange changeParentUnitChange = ChangeParentUnitChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeParentUnitChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.KeyReference previousValue; + + private com.commercetools.history.models.common.KeyReference nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeParentUnitChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public ChangeParentUnitChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public ChangeParentUnitChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public ChangeParentUnitChangeBuilder previousValue( + final com.commercetools.history.models.common.KeyReference previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeParentUnitChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeParentUnitChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public ChangeParentUnitChangeBuilder nextValue( + final com.commercetools.history.models.common.KeyReference nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.KeyReference getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.KeyReference getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeParentUnitChange with checking for non-null required values + * @return ChangeParentUnitChange + */ + public ChangeParentUnitChange build() { + Objects.requireNonNull(change, ChangeParentUnitChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeParentUnitChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeParentUnitChange.class + ": nextValue is missing"); + return new ChangeParentUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeParentUnitChange without checking for non-null required values + * @return ChangeParentUnitChange + */ + public ChangeParentUnitChange buildUnchecked() { + return new ChangeParentUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeParentUnitChangeBuilder + * @return builder + */ + public static ChangeParentUnitChangeBuilder of() { + return new ChangeParentUnitChangeBuilder(); + } + + /** + * create builder for ChangeParentUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeParentUnitChangeBuilder of(final ChangeParentUnitChange template) { + ChangeParentUnitChangeBuilder builder = new ChangeParentUnitChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeImpl.java new file mode 100644 index 00000000000..128268398dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentUnitChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Change Parent Unit update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeParentUnitChangeImpl implements ChangeParentUnitChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.KeyReference previousValue; + + private com.commercetools.history.models.common.KeyReference nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + ChangeParentUnitChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.KeyReference previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.KeyReference nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = CHANGE_PARENT_UNIT_CHANGE; + } + + /** + * create empty instance + */ + public ChangeParentUnitChangeImpl() { + this.type = CHANGE_PARENT_UNIT_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.KeyReference getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.KeyReference getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.KeyReference previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.KeyReference nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeParentUnitChangeImpl that = (ChangeParentUnitChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChange.java new file mode 100644 index 00000000000..3da36a9177f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChange.java @@ -0,0 +1,193 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Change Product Selection Active update action.

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

+ *     ChangeProductSelectionActiveChange changeProductSelectionActiveChange = ChangeProductSelectionActiveChange.builder()
+ *             .change("{change}")
+ *             .productSelection(productSelectionBuilder -> productSelectionBuilder)
+ *             .previousValue(true)
+ *             .nextValue(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeProductSelectionActiveChangeImpl.class) +public interface ChangeProductSelectionActiveChange extends Change { + + /** + * discriminator value for ChangeProductSelectionActiveChange + */ + String CHANGE_PRODUCT_SELECTION_ACTIVE_CHANGE = "ChangeProductSelectionActiveChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Reference to the Product Selection which was changed.

+ * @return productSelection + */ + @NotNull + @Valid + @JsonProperty("productSelection") + public Reference getProductSelection(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public Boolean getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public Boolean getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Reference to the Product Selection which was changed.

+ * @param productSelection value to be set + */ + + public void setProductSelection(final Reference productSelection); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final Boolean previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final Boolean nextValue); + + /** + * factory method + * @return instance of ChangeProductSelectionActiveChange + */ + public static ChangeProductSelectionActiveChange of() { + return new ChangeProductSelectionActiveChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeProductSelectionActiveChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeProductSelectionActiveChange of(final ChangeProductSelectionActiveChange template) { + ChangeProductSelectionActiveChangeImpl instance = new ChangeProductSelectionActiveChangeImpl(); + instance.setChange(template.getChange()); + instance.setProductSelection(template.getProductSelection()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of ChangeProductSelectionActiveChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeProductSelectionActiveChange deepCopy( + @Nullable final ChangeProductSelectionActiveChange template) { + if (template == null) { + return null; + } + ChangeProductSelectionActiveChangeImpl instance = new ChangeProductSelectionActiveChangeImpl(); + instance.setChange(template.getChange()); + instance.setProductSelection( + com.commercetools.history.models.common.Reference.deepCopy(template.getProductSelection())); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeProductSelectionActiveChange + * @return builder + */ + public static ChangeProductSelectionActiveChangeBuilder builder() { + return ChangeProductSelectionActiveChangeBuilder.of(); + } + + /** + * create builder for ChangeProductSelectionActiveChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeProductSelectionActiveChangeBuilder builder(final ChangeProductSelectionActiveChange template) { + return ChangeProductSelectionActiveChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeProductSelectionActiveChange(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-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeBuilder.java new file mode 100644 index 00000000000..fb6bb0f8c06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChangeProductSelectionActiveChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ChangeProductSelectionActiveChange changeProductSelectionActiveChange = ChangeProductSelectionActiveChange.builder()
+ *             .change("{change}")
+ *             .productSelection(productSelectionBuilder -> productSelectionBuilder)
+ *             .previousValue(true)
+ *             .nextValue(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeProductSelectionActiveChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Reference productSelection; + + private Boolean previousValue; + + private Boolean nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Reference to the Product Selection which was changed.

+ * @param builder function to build the productSelection value + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder productSelection( + Function builder) { + this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Reference to the Product Selection which was changed.

+ * @param builder function to build the productSelection value + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder withProductSelection( + Function builder) { + this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the Product Selection which was changed.

+ * @param productSelection value to be set + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder productSelection( + final com.commercetools.history.models.common.Reference productSelection) { + this.productSelection = productSelection; + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder previousValue(final Boolean previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public ChangeProductSelectionActiveChangeBuilder nextValue(final Boolean nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Reference to the Product Selection which was changed.

+ * @return productSelection + */ + + public com.commercetools.history.models.common.Reference getProductSelection() { + return this.productSelection; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public Boolean getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public Boolean getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeProductSelectionActiveChange with checking for non-null required values + * @return ChangeProductSelectionActiveChange + */ + public ChangeProductSelectionActiveChange build() { + Objects.requireNonNull(change, ChangeProductSelectionActiveChange.class + ": change is missing"); + Objects.requireNonNull(productSelection, + ChangeProductSelectionActiveChange.class + ": productSelection is missing"); + Objects.requireNonNull(previousValue, ChangeProductSelectionActiveChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeProductSelectionActiveChange.class + ": nextValue is missing"); + return new ChangeProductSelectionActiveChangeImpl(change, productSelection, previousValue, nextValue); + } + + /** + * builds ChangeProductSelectionActiveChange without checking for non-null required values + * @return ChangeProductSelectionActiveChange + */ + public ChangeProductSelectionActiveChange buildUnchecked() { + return new ChangeProductSelectionActiveChangeImpl(change, productSelection, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeProductSelectionActiveChangeBuilder + * @return builder + */ + public static ChangeProductSelectionActiveChangeBuilder of() { + return new ChangeProductSelectionActiveChangeBuilder(); + } + + /** + * create builder for ChangeProductSelectionActiveChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeProductSelectionActiveChangeBuilder of(final ChangeProductSelectionActiveChange template) { + ChangeProductSelectionActiveChangeBuilder builder = new ChangeProductSelectionActiveChangeBuilder(); + builder.change = template.getChange(); + builder.productSelection = template.getProductSelection(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeImpl.java new file mode 100644 index 00000000000..e13a87dc7dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeProductSelectionActiveChangeImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Change Product Selection Active update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeProductSelectionActiveChangeImpl implements ChangeProductSelectionActiveChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Reference productSelection; + + private Boolean previousValue; + + private Boolean nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + ChangeProductSelectionActiveChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("productSelection") final com.commercetools.history.models.common.Reference productSelection, + @JsonProperty("previousValue") final Boolean previousValue, + @JsonProperty("nextValue") final Boolean nextValue) { + this.change = change; + this.productSelection = productSelection; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = CHANGE_PRODUCT_SELECTION_ACTIVE_CHANGE; + } + + /** + * create empty instance + */ + public ChangeProductSelectionActiveChangeImpl() { + this.type = CHANGE_PRODUCT_SELECTION_ACTIVE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Reference to the Product Selection which was changed.

+ */ + + public com.commercetools.history.models.common.Reference getProductSelection() { + return this.productSelection; + } + + /** + *

Value before the change.

+ */ + + public Boolean getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public Boolean getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setProductSelection(final com.commercetools.history.models.common.Reference productSelection) { + this.productSelection = productSelection; + } + + public void setPreviousValue(final Boolean previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final Boolean nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeProductSelectionActiveChangeImpl that = (ChangeProductSelectionActiveChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(productSelection, that.productSelection) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(productSelection) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChange.java new file mode 100644 index 00000000000..a3eb306440a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChange.java @@ -0,0 +1,171 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.BusinessUnitStatus; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Change Status update action.

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

+ *     ChangeStatusChange changeStatusChange = ChangeStatusChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitStatus.ACTIVE)
+ *             .nextValue(BusinessUnitStatus.ACTIVE)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeStatusChangeImpl.class) +public interface ChangeStatusChange extends Change { + + /** + * discriminator value for ChangeStatusChange + */ + String CHANGE_STATUS_CHANGE = "ChangeStatusChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public BusinessUnitStatus getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public BusinessUnitStatus getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final BusinessUnitStatus previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final BusinessUnitStatus nextValue); + + /** + * factory method + * @return instance of ChangeStatusChange + */ + public static ChangeStatusChange of() { + return new ChangeStatusChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeStatusChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeStatusChange of(final ChangeStatusChange template) { + ChangeStatusChangeImpl instance = new ChangeStatusChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of ChangeStatusChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeStatusChange deepCopy(@Nullable final ChangeStatusChange template) { + if (template == null) { + return null; + } + ChangeStatusChangeImpl instance = new ChangeStatusChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeStatusChange + * @return builder + */ + public static ChangeStatusChangeBuilder builder() { + return ChangeStatusChangeBuilder.of(); + } + + /** + * create builder for ChangeStatusChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeStatusChangeBuilder builder(final ChangeStatusChange template) { + return ChangeStatusChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeStatusChange(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-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeBuilder.java new file mode 100644 index 00000000000..c03151a3607 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChangeStatusChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ChangeStatusChange changeStatusChange = ChangeStatusChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitStatus.ACTIVE)
+ *             .nextValue(BusinessUnitStatus.ACTIVE)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeStatusChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.BusinessUnitStatus previousValue; + + private com.commercetools.history.models.common.BusinessUnitStatus nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeStatusChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public ChangeStatusChangeBuilder previousValue( + final com.commercetools.history.models.common.BusinessUnitStatus previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public ChangeStatusChangeBuilder nextValue( + final com.commercetools.history.models.common.BusinessUnitStatus nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.BusinessUnitStatus getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.BusinessUnitStatus getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeStatusChange with checking for non-null required values + * @return ChangeStatusChange + */ + public ChangeStatusChange build() { + Objects.requireNonNull(change, ChangeStatusChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeStatusChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeStatusChange.class + ": nextValue is missing"); + return new ChangeStatusChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeStatusChange without checking for non-null required values + * @return ChangeStatusChange + */ + public ChangeStatusChange buildUnchecked() { + return new ChangeStatusChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeStatusChangeBuilder + * @return builder + */ + public static ChangeStatusChangeBuilder of() { + return new ChangeStatusChangeBuilder(); + } + + /** + * create builder for ChangeStatusChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeStatusChangeBuilder of(final ChangeStatusChange template) { + ChangeStatusChangeBuilder builder = new ChangeStatusChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeImpl.java new file mode 100644 index 00000000000..c3ef1be9692 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeStatusChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Change Status update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeStatusChangeImpl implements ChangeStatusChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.BusinessUnitStatus previousValue; + + private com.commercetools.history.models.common.BusinessUnitStatus nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + ChangeStatusChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.BusinessUnitStatus previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.BusinessUnitStatus nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = CHANGE_STATUS_CHANGE; + } + + /** + * create empty instance + */ + public ChangeStatusChangeImpl() { + this.type = CHANGE_STATUS_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitStatus getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitStatus getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.BusinessUnitStatus previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.BusinessUnitStatus nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeStatusChangeImpl that = (ChangeStatusChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChange.java new file mode 100644 index 00000000000..cbaed92d238 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChange.java @@ -0,0 +1,156 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Associate; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Remove Associate update action.

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

+ *     RemoveAssociateChange removeAssociateChange = RemoveAssociateChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveAssociateChangeImpl.class) +public interface RemoveAssociateChange extends Change { + + /** + * discriminator value for RemoveAssociateChange + */ + String REMOVE_ASSOCIATE_CHANGE = "RemoveAssociateChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public Associate getPreviousValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final Associate previousValue); + + /** + * factory method + * @return instance of RemoveAssociateChange + */ + public static RemoveAssociateChange of() { + return new RemoveAssociateChangeImpl(); + } + + /** + * factory method to create a shallow copy RemoveAssociateChange + * @param template instance to be copied + * @return copy instance + */ + public static RemoveAssociateChange of(final RemoveAssociateChange template) { + RemoveAssociateChangeImpl instance = new RemoveAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + /** + * factory method to create a deep copy of RemoveAssociateChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveAssociateChange deepCopy(@Nullable final RemoveAssociateChange template) { + if (template == null) { + return null; + } + RemoveAssociateChangeImpl instance = new RemoveAssociateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.Associate.deepCopy(template.getPreviousValue())); + return instance; + } + + /** + * builder factory method for RemoveAssociateChange + * @return builder + */ + public static RemoveAssociateChangeBuilder builder() { + return RemoveAssociateChangeBuilder.of(); + } + + /** + * create builder for RemoveAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveAssociateChangeBuilder builder(final RemoveAssociateChange template) { + return RemoveAssociateChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveAssociateChange(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-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeBuilder.java new file mode 100644 index 00000000000..e921ff0eade --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeBuilder.java @@ -0,0 +1,133 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveAssociateChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveAssociateChange removeAssociateChange = RemoveAssociateChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveAssociateChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Associate previousValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RemoveAssociateChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public RemoveAssociateChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public RemoveAssociateChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public RemoveAssociateChangeBuilder previousValue( + final com.commercetools.history.models.common.Associate previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.Associate getPreviousValue() { + return this.previousValue; + } + + /** + * builds RemoveAssociateChange with checking for non-null required values + * @return RemoveAssociateChange + */ + public RemoveAssociateChange build() { + Objects.requireNonNull(change, RemoveAssociateChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, RemoveAssociateChange.class + ": previousValue is missing"); + return new RemoveAssociateChangeImpl(change, previousValue); + } + + /** + * builds RemoveAssociateChange without checking for non-null required values + * @return RemoveAssociateChange + */ + public RemoveAssociateChange buildUnchecked() { + return new RemoveAssociateChangeImpl(change, previousValue); + } + + /** + * factory method for an instance of RemoveAssociateChangeBuilder + * @return builder + */ + public static RemoveAssociateChangeBuilder of() { + return new RemoveAssociateChangeBuilder(); + } + + /** + * create builder for RemoveAssociateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveAssociateChangeBuilder of(final RemoveAssociateChange template) { + RemoveAssociateChangeBuilder builder = new RemoveAssociateChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeImpl.java new file mode 100644 index 00000000000..38d5c717d90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssociateChangeImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Remove Associate update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveAssociateChangeImpl implements RemoveAssociateChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Associate previousValue; + + /** + * create instance with all properties + */ + @JsonCreator + RemoveAssociateChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.Associate previousValue) { + this.change = change; + this.previousValue = previousValue; + this.type = REMOVE_ASSOCIATE_CHANGE; + } + + /** + * create empty instance + */ + public RemoveAssociateChangeImpl() { + this.type = REMOVE_ASSOCIATE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.Associate getPreviousValue() { + return this.previousValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Associate previousValue) { + this.previousValue = previousValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveAssociateChangeImpl that = (RemoveAssociateChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).append(previousValue).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChange.java new file mode 100644 index 00000000000..47c0b46d9a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChange.java @@ -0,0 +1,156 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.ProductSelectionSetting; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Remove Product Selection update action.

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

+ *     RemoveProductSelectionChange removeProductSelectionChange = RemoveProductSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveProductSelectionChangeImpl.class) +public interface RemoveProductSelectionChange extends Change { + + /** + * discriminator value for RemoveProductSelectionChange + */ + String REMOVE_PRODUCT_SELECTION_CHANGE = "RemoveProductSelectionChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public ProductSelectionSetting getPreviousValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final ProductSelectionSetting previousValue); + + /** + * factory method + * @return instance of RemoveProductSelectionChange + */ + public static RemoveProductSelectionChange of() { + return new RemoveProductSelectionChangeImpl(); + } + + /** + * factory method to create a shallow copy RemoveProductSelectionChange + * @param template instance to be copied + * @return copy instance + */ + public static RemoveProductSelectionChange of(final RemoveProductSelectionChange template) { + RemoveProductSelectionChangeImpl instance = new RemoveProductSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + /** + * factory method to create a deep copy of RemoveProductSelectionChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveProductSelectionChange deepCopy(@Nullable final RemoveProductSelectionChange template) { + if (template == null) { + return null; + } + RemoveProductSelectionChangeImpl instance = new RemoveProductSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.ProductSelectionSetting.deepCopy(template.getPreviousValue())); + return instance; + } + + /** + * builder factory method for RemoveProductSelectionChange + * @return builder + */ + public static RemoveProductSelectionChangeBuilder builder() { + return RemoveProductSelectionChangeBuilder.of(); + } + + /** + * create builder for RemoveProductSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveProductSelectionChangeBuilder builder(final RemoveProductSelectionChange template) { + return RemoveProductSelectionChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveProductSelectionChange(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-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeBuilder.java new file mode 100644 index 00000000000..1dbf5be83cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveProductSelectionChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveProductSelectionChange removeProductSelectionChange = RemoveProductSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveProductSelectionChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ProductSelectionSetting previousValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RemoveProductSelectionChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public RemoveProductSelectionChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()) + .build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public RemoveProductSelectionChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public RemoveProductSelectionChangeBuilder previousValue( + final com.commercetools.history.models.common.ProductSelectionSetting previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.ProductSelectionSetting getPreviousValue() { + return this.previousValue; + } + + /** + * builds RemoveProductSelectionChange with checking for non-null required values + * @return RemoveProductSelectionChange + */ + public RemoveProductSelectionChange build() { + Objects.requireNonNull(change, RemoveProductSelectionChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, RemoveProductSelectionChange.class + ": previousValue is missing"); + return new RemoveProductSelectionChangeImpl(change, previousValue); + } + + /** + * builds RemoveProductSelectionChange without checking for non-null required values + * @return RemoveProductSelectionChange + */ + public RemoveProductSelectionChange buildUnchecked() { + return new RemoveProductSelectionChangeImpl(change, previousValue); + } + + /** + * factory method for an instance of RemoveProductSelectionChangeBuilder + * @return builder + */ + public static RemoveProductSelectionChangeBuilder of() { + return new RemoveProductSelectionChangeBuilder(); + } + + /** + * create builder for RemoveProductSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveProductSelectionChangeBuilder of(final RemoveProductSelectionChange template) { + RemoveProductSelectionChangeBuilder builder = new RemoveProductSelectionChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeImpl.java new file mode 100644 index 00000000000..7b601f31b80 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductSelectionChangeImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Remove Product Selection update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveProductSelectionChangeImpl implements RemoveProductSelectionChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.ProductSelectionSetting previousValue; + + /** + * create instance with all properties + */ + @JsonCreator + RemoveProductSelectionChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.ProductSelectionSetting previousValue) { + this.change = change; + this.previousValue = previousValue; + this.type = REMOVE_PRODUCT_SELECTION_CHANGE; + } + + /** + * create empty instance + */ + public RemoveProductSelectionChangeImpl() { + this.type = REMOVE_PRODUCT_SELECTION_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.ProductSelectionSetting getPreviousValue() { + return this.previousValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ProductSelectionSetting previousValue) { + this.previousValue = previousValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveProductSelectionChangeImpl that = (RemoveProductSelectionChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).append(previousValue).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChange.java new file mode 100644 index 00000000000..074b568e106 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChange.java @@ -0,0 +1,189 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.QuoteState; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Request Quote Renegotiation update action.

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

+ *     RequestQuoteRenegotiationChange requestQuoteRenegotiationChange = RequestQuoteRenegotiationChange.builder()
+ *             .change("{change}")
+ *             .previousValue(QuoteState.PENDING)
+ *             .nextValue(QuoteState.PENDING)
+ *             .buyerComment("{buyerComment}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RequestQuoteRenegotiationChangeImpl.class) +public interface RequestQuoteRenegotiationChange extends Change { + + /** + * discriminator value for RequestQuoteRenegotiationChange + */ + String REQUEST_QUOTE_RENEGOTIATION_CHANGE = "RequestQuoteRenegotiationChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public QuoteState getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public QuoteState getNextValue(); + + /** + *

Message from the Buyer regarding the Quote renegotiation request.

+ * @return buyerComment + */ + @NotNull + @JsonProperty("buyerComment") + public String getBuyerComment(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final QuoteState previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final QuoteState nextValue); + + /** + *

Message from the Buyer regarding the Quote renegotiation request.

+ * @param buyerComment value to be set + */ + + public void setBuyerComment(final String buyerComment); + + /** + * factory method + * @return instance of RequestQuoteRenegotiationChange + */ + public static RequestQuoteRenegotiationChange of() { + return new RequestQuoteRenegotiationChangeImpl(); + } + + /** + * factory method to create a shallow copy RequestQuoteRenegotiationChange + * @param template instance to be copied + * @return copy instance + */ + public static RequestQuoteRenegotiationChange of(final RequestQuoteRenegotiationChange template) { + RequestQuoteRenegotiationChangeImpl instance = new RequestQuoteRenegotiationChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + instance.setBuyerComment(template.getBuyerComment()); + return instance; + } + + /** + * factory method to create a deep copy of RequestQuoteRenegotiationChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RequestQuoteRenegotiationChange deepCopy(@Nullable final RequestQuoteRenegotiationChange template) { + if (template == null) { + return null; + } + RequestQuoteRenegotiationChangeImpl instance = new RequestQuoteRenegotiationChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + instance.setBuyerComment(template.getBuyerComment()); + return instance; + } + + /** + * builder factory method for RequestQuoteRenegotiationChange + * @return builder + */ + public static RequestQuoteRenegotiationChangeBuilder builder() { + return RequestQuoteRenegotiationChangeBuilder.of(); + } + + /** + * create builder for RequestQuoteRenegotiationChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RequestQuoteRenegotiationChangeBuilder builder(final RequestQuoteRenegotiationChange template) { + return RequestQuoteRenegotiationChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRequestQuoteRenegotiationChange(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-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeBuilder.java new file mode 100644 index 00000000000..cf83c51784f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeBuilder.java @@ -0,0 +1,159 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RequestQuoteRenegotiationChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RequestQuoteRenegotiationChange requestQuoteRenegotiationChange = RequestQuoteRenegotiationChange.builder()
+ *             .change("{change}")
+ *             .previousValue(QuoteState.PENDING)
+ *             .nextValue(QuoteState.PENDING)
+ *             .buyerComment("{buyerComment}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RequestQuoteRenegotiationChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.QuoteState previousValue; + + private com.commercetools.history.models.common.QuoteState nextValue; + + private String buyerComment; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RequestQuoteRenegotiationChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public RequestQuoteRenegotiationChangeBuilder previousValue( + final com.commercetools.history.models.common.QuoteState previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public RequestQuoteRenegotiationChangeBuilder nextValue( + final com.commercetools.history.models.common.QuoteState nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

Message from the Buyer regarding the Quote renegotiation request.

+ * @param buyerComment value to be set + * @return Builder + */ + + public RequestQuoteRenegotiationChangeBuilder buyerComment(final String buyerComment) { + this.buyerComment = buyerComment; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.QuoteState getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.QuoteState getNextValue() { + return this.nextValue; + } + + /** + *

Message from the Buyer regarding the Quote renegotiation request.

+ * @return buyerComment + */ + + public String getBuyerComment() { + return this.buyerComment; + } + + /** + * builds RequestQuoteRenegotiationChange with checking for non-null required values + * @return RequestQuoteRenegotiationChange + */ + public RequestQuoteRenegotiationChange build() { + Objects.requireNonNull(change, RequestQuoteRenegotiationChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, RequestQuoteRenegotiationChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, RequestQuoteRenegotiationChange.class + ": nextValue is missing"); + Objects.requireNonNull(buyerComment, RequestQuoteRenegotiationChange.class + ": buyerComment is missing"); + return new RequestQuoteRenegotiationChangeImpl(change, previousValue, nextValue, buyerComment); + } + + /** + * builds RequestQuoteRenegotiationChange without checking for non-null required values + * @return RequestQuoteRenegotiationChange + */ + public RequestQuoteRenegotiationChange buildUnchecked() { + return new RequestQuoteRenegotiationChangeImpl(change, previousValue, nextValue, buyerComment); + } + + /** + * factory method for an instance of RequestQuoteRenegotiationChangeBuilder + * @return builder + */ + public static RequestQuoteRenegotiationChangeBuilder of() { + return new RequestQuoteRenegotiationChangeBuilder(); + } + + /** + * create builder for RequestQuoteRenegotiationChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RequestQuoteRenegotiationChangeBuilder of(final RequestQuoteRenegotiationChange template) { + RequestQuoteRenegotiationChangeBuilder builder = new RequestQuoteRenegotiationChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + builder.buyerComment = template.getBuyerComment(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeImpl.java new file mode 100644 index 00000000000..48878138a96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RequestQuoteRenegotiationChangeImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Request Quote Renegotiation update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RequestQuoteRenegotiationChangeImpl implements RequestQuoteRenegotiationChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.QuoteState previousValue; + + private com.commercetools.history.models.common.QuoteState nextValue; + + private String buyerComment; + + /** + * create instance with all properties + */ + @JsonCreator + RequestQuoteRenegotiationChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.QuoteState previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.QuoteState nextValue, + @JsonProperty("buyerComment") final String buyerComment) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.buyerComment = buyerComment; + this.type = REQUEST_QUOTE_RENEGOTIATION_CHANGE; + } + + /** + * create empty instance + */ + public RequestQuoteRenegotiationChangeImpl() { + this.type = REQUEST_QUOTE_RENEGOTIATION_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.QuoteState getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.QuoteState getNextValue() { + return this.nextValue; + } + + /** + *

Message from the Buyer regarding the Quote renegotiation request.

+ */ + + public String getBuyerComment() { + return this.buyerComment; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.QuoteState previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.QuoteState nextValue) { + this.nextValue = nextValue; + } + + public void setBuyerComment(final String buyerComment) { + this.buyerComment = buyerComment; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RequestQuoteRenegotiationChangeImpl that = (RequestQuoteRenegotiationChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(buyerComment, that.buyerComment) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .append(buyerComment) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChange.java new file mode 100644 index 00000000000..e8fa7ae00e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChange.java @@ -0,0 +1,225 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Address; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Set Address Custom Field update action.

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

+ *     SetAddressCustomFieldChange setAddressCustomFieldChange = SetAddressCustomFieldChange.builder()
+ *             .change("{change}")
+ *             .address(addressBuilder -> addressBuilder)
+ *             .name("{name}")
+ *             .customTypeId("{customTypeId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAddressCustomFieldChangeImpl.class) +public interface SetAddressCustomFieldChange extends Change { + + /** + * discriminator value for SetAddressCustomFieldChange + */ + String SET_ADDRESS_CUSTOM_FIELD_CHANGE = "SetAddressCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Address which was extended.

+ * @return address + */ + @NotNull + @Valid + @JsonProperty("address") + public Address getAddress(); + + /** + *

Name of the Custom Field.

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

id of the referenced Type.

+ * @return customTypeId + */ + @NotNull + @JsonProperty("customTypeId") + public String getCustomTypeId(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public Object getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public Object getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Address which was extended.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + *

Name of the Custom Field.

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

id of the referenced Type.

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

Value before the change.

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

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final Object nextValue); + + /** + * factory method + * @return instance of SetAddressCustomFieldChange + */ + public static SetAddressCustomFieldChange of() { + return new SetAddressCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetAddressCustomFieldChange of(final SetAddressCustomFieldChange template) { + SetAddressCustomFieldChangeImpl instance = new SetAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddress(template.getAddress()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of SetAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAddressCustomFieldChange deepCopy(@Nullable final SetAddressCustomFieldChange template) { + if (template == null) { + return null; + } + SetAddressCustomFieldChangeImpl instance = new SetAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddress(com.commercetools.history.models.common.Address.deepCopy(template.getAddress())); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetAddressCustomFieldChange + * @return builder + */ + public static SetAddressCustomFieldChangeBuilder builder() { + return SetAddressCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAddressCustomFieldChangeBuilder builder(final SetAddressCustomFieldChange template) { + return SetAddressCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAddressCustomFieldChange(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-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..ab02483dca3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeBuilder.java @@ -0,0 +1,230 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAddressCustomFieldChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetAddressCustomFieldChange setAddressCustomFieldChange = SetAddressCustomFieldChange.builder()
+ *             .change("{change}")
+ *             .address(addressBuilder -> addressBuilder)
+ *             .name("{name}")
+ *             .customTypeId("{customTypeId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAddressCustomFieldChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Address address; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetAddressCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Address which was extended.

+ * @param builder function to build the address value + * @return Builder + */ + + public SetAddressCustomFieldChangeBuilder address( + Function builder) { + this.address = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()).build(); + return this; + } + + /** + *

Address which was extended.

+ * @param builder function to build the address value + * @return Builder + */ + + public SetAddressCustomFieldChangeBuilder withAddress( + Function builder) { + this.address = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()); + return this; + } + + /** + *

Address which was extended.

+ * @param address value to be set + * @return Builder + */ + + public SetAddressCustomFieldChangeBuilder address(final com.commercetools.history.models.common.Address address) { + this.address = address; + return this; + } + + /** + *

Name of the Custom Field.

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

id of the referenced Type.

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

Value before the change.

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

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public SetAddressCustomFieldChangeBuilder nextValue(final java.lang.Object nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Address which was extended.

+ * @return address + */ + + public com.commercetools.history.models.common.Address getAddress() { + return this.address; + } + + /** + *

Name of the Custom Field.

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

id of the referenced Type.

+ * @return customTypeId + */ + + public String getCustomTypeId() { + return this.customTypeId; + } + + /** + *

Value before the change.

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

Value after the change.

+ * @return nextValue + */ + + public java.lang.Object getNextValue() { + return this.nextValue; + } + + /** + * builds SetAddressCustomFieldChange with checking for non-null required values + * @return SetAddressCustomFieldChange + */ + public SetAddressCustomFieldChange build() { + Objects.requireNonNull(change, SetAddressCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(address, SetAddressCustomFieldChange.class + ": address is missing"); + Objects.requireNonNull(name, SetAddressCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetAddressCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetAddressCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetAddressCustomFieldChange.class + ": nextValue is missing"); + return new SetAddressCustomFieldChangeImpl(change, address, name, customTypeId, previousValue, nextValue); + } + + /** + * builds SetAddressCustomFieldChange without checking for non-null required values + * @return SetAddressCustomFieldChange + */ + public SetAddressCustomFieldChange buildUnchecked() { + return new SetAddressCustomFieldChangeImpl(change, address, name, customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetAddressCustomFieldChangeBuilder + * @return builder + */ + public static SetAddressCustomFieldChangeBuilder of() { + return new SetAddressCustomFieldChangeBuilder(); + } + + /** + * create builder for SetAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAddressCustomFieldChangeBuilder of(final SetAddressCustomFieldChange template) { + SetAddressCustomFieldChangeBuilder builder = new SetAddressCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.address = template.getAddress(); + builder.name = template.getName(); + builder.customTypeId = template.getCustomTypeId(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeImpl.java new file mode 100644 index 00000000000..d67f08278bd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomFieldChangeImpl.java @@ -0,0 +1,174 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Set Address Custom Field update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAddressCustomFieldChangeImpl implements SetAddressCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Address address; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetAddressCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("address") final com.commercetools.history.models.common.Address address, + @JsonProperty("name") final String name, @JsonProperty("customTypeId") final String customTypeId, + @JsonProperty("previousValue") final java.lang.Object previousValue, + @JsonProperty("nextValue") final java.lang.Object nextValue) { + this.change = change; + this.address = address; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetAddressCustomFieldChangeImpl() { + this.type = SET_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Address which was extended.

+ */ + + public com.commercetools.history.models.common.Address getAddress() { + return this.address; + } + + /** + *

Name of the Custom Field.

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

id of the referenced Type.

+ */ + + public String getCustomTypeId() { + return this.customTypeId; + } + + /** + *

Value before the change.

+ */ + + public java.lang.Object getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public java.lang.Object getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddress(final com.commercetools.history.models.common.Address address) { + this.address = address; + } + + public void setName(final String name) { + this.name = name; + } + + public void setCustomTypeId(final String customTypeId) { + this.customTypeId = customTypeId; + } + + public void setPreviousValue(final java.lang.Object previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final java.lang.Object nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAddressCustomFieldChangeImpl that = (SetAddressCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(address, that.address) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(address) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChange.java new file mode 100644 index 00000000000..f33e8354a7f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChange.java @@ -0,0 +1,195 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.Address; +import com.commercetools.history.models.common.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Set Address Custom Type update action.

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

+ *     SetAddressCustomTypeChange setAddressCustomTypeChange = SetAddressCustomTypeChange.builder()
+ *             .change("{change}")
+ *             .address(addressBuilder -> addressBuilder)
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAddressCustomTypeChangeImpl.class) +public interface SetAddressCustomTypeChange extends Change { + + /** + * discriminator value for SetAddressCustomTypeChange + */ + String SET_ADDRESS_CUSTOM_TYPE_CHANGE = "SetAddressCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Address which was extended.

+ * @return address + */ + @NotNull + @Valid + @JsonProperty("address") + public Address getAddress(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public CustomFields getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public CustomFields getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Address which was extended.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final CustomFields previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final CustomFields nextValue); + + /** + * factory method + * @return instance of SetAddressCustomTypeChange + */ + public static SetAddressCustomTypeChange of() { + return new SetAddressCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetAddressCustomTypeChange of(final SetAddressCustomTypeChange template) { + SetAddressCustomTypeChangeImpl instance = new SetAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddress(template.getAddress()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of SetAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAddressCustomTypeChange deepCopy(@Nullable final SetAddressCustomTypeChange template) { + if (template == null) { + return null; + } + SetAddressCustomTypeChangeImpl instance = new SetAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddress(com.commercetools.history.models.common.Address.deepCopy(template.getAddress())); + instance.setPreviousValue( + com.commercetools.history.models.common.CustomFields.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetAddressCustomTypeChange + * @return builder + */ + public static SetAddressCustomTypeChangeBuilder builder() { + return SetAddressCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAddressCustomTypeChangeBuilder builder(final SetAddressCustomTypeChange template) { + return SetAddressCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAddressCustomTypeChange(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-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..82b2ffe701b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeBuilder.java @@ -0,0 +1,232 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAddressCustomTypeChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetAddressCustomTypeChange setAddressCustomTypeChange = SetAddressCustomTypeChange.builder()
+ *             .change("{change}")
+ *             .address(addressBuilder -> addressBuilder)
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAddressCustomTypeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Address address; + + private com.commercetools.history.models.common.CustomFields previousValue; + + private com.commercetools.history.models.common.CustomFields nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Address which was extended.

+ * @param builder function to build the address value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder address( + Function builder) { + this.address = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()).build(); + return this; + } + + /** + *

Address which was extended.

+ * @param builder function to build the address value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder withAddress( + Function builder) { + this.address = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()); + return this; + } + + /** + *

Address which was extended.

+ * @param address value to be set + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder address(final com.commercetools.history.models.common.Address address) { + this.address = address; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder previousValue( + final com.commercetools.history.models.common.CustomFields previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public SetAddressCustomTypeChangeBuilder nextValue( + final com.commercetools.history.models.common.CustomFields nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Address which was extended.

+ * @return address + */ + + public com.commercetools.history.models.common.Address getAddress() { + return this.address; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.CustomFields getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.CustomFields getNextValue() { + return this.nextValue; + } + + /** + * builds SetAddressCustomTypeChange with checking for non-null required values + * @return SetAddressCustomTypeChange + */ + public SetAddressCustomTypeChange build() { + Objects.requireNonNull(change, SetAddressCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(address, SetAddressCustomTypeChange.class + ": address is missing"); + Objects.requireNonNull(previousValue, SetAddressCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetAddressCustomTypeChange.class + ": nextValue is missing"); + return new SetAddressCustomTypeChangeImpl(change, address, previousValue, nextValue); + } + + /** + * builds SetAddressCustomTypeChange without checking for non-null required values + * @return SetAddressCustomTypeChange + */ + public SetAddressCustomTypeChange buildUnchecked() { + return new SetAddressCustomTypeChangeImpl(change, address, previousValue, nextValue); + } + + /** + * factory method for an instance of SetAddressCustomTypeChangeBuilder + * @return builder + */ + public static SetAddressCustomTypeChangeBuilder of() { + return new SetAddressCustomTypeChangeBuilder(); + } + + /** + * create builder for SetAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAddressCustomTypeChangeBuilder of(final SetAddressCustomTypeChange template) { + SetAddressCustomTypeChangeBuilder builder = new SetAddressCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.address = template.getAddress(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeImpl.java new file mode 100644 index 00000000000..cfae861c5c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAddressCustomTypeChangeImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Set Address Custom Type update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAddressCustomTypeChangeImpl implements SetAddressCustomTypeChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Address address; + + private com.commercetools.history.models.common.CustomFields previousValue; + + private com.commercetools.history.models.common.CustomFields nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetAddressCustomTypeChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("address") final com.commercetools.history.models.common.Address address, + @JsonProperty("previousValue") final com.commercetools.history.models.common.CustomFields previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue) { + this.change = change; + this.address = address; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_ADDRESS_CUSTOM_TYPE_CHANGE; + } + + /** + * create empty instance + */ + public SetAddressCustomTypeChangeImpl() { + this.type = SET_ADDRESS_CUSTOM_TYPE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Address which was extended.

+ */ + + public com.commercetools.history.models.common.Address getAddress() { + return this.address; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.CustomFields getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.CustomFields getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddress(final com.commercetools.history.models.common.Address address) { + this.address = address; + } + + public void setPreviousValue(final com.commercetools.history.models.common.CustomFields previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.CustomFields nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAddressCustomTypeChangeImpl that = (SetAddressCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(address, that.address) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(address) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChange.java new file mode 100644 index 00000000000..d12ea689307 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChange.java @@ -0,0 +1,170 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Set Contact Email update action.

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

+ *     SetContactEmailChange setContactEmailChange = SetContactEmailChange.builder()
+ *             .change("{change}")
+ *             .previousValue("{previousValue}")
+ *             .nextValue("{nextValue}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetContactEmailChangeImpl.class) +public interface SetContactEmailChange extends Change { + + /** + * discriminator value for SetContactEmailChange + */ + String SET_CONTACT_EMAIL_CHANGE = "SetContactEmailChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public String getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public String getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

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

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final String nextValue); + + /** + * factory method + * @return instance of SetContactEmailChange + */ + public static SetContactEmailChange of() { + return new SetContactEmailChangeImpl(); + } + + /** + * factory method to create a shallow copy SetContactEmailChange + * @param template instance to be copied + * @return copy instance + */ + public static SetContactEmailChange of(final SetContactEmailChange template) { + SetContactEmailChangeImpl instance = new SetContactEmailChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of SetContactEmailChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetContactEmailChange deepCopy(@Nullable final SetContactEmailChange template) { + if (template == null) { + return null; + } + SetContactEmailChangeImpl instance = new SetContactEmailChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetContactEmailChange + * @return builder + */ + public static SetContactEmailChangeBuilder builder() { + return SetContactEmailChangeBuilder.of(); + } + + /** + * create builder for SetContactEmailChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetContactEmailChangeBuilder builder(final SetContactEmailChange template) { + return SetContactEmailChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetContactEmailChange(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-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeBuilder.java new file mode 100644 index 00000000000..3209368b930 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetContactEmailChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetContactEmailChange setContactEmailChange = SetContactEmailChange.builder()
+ *             .change("{change}")
+ *             .previousValue("{previousValue}")
+ *             .nextValue("{nextValue}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetContactEmailChangeBuilder implements Builder { + + private String change; + + private String previousValue; + + private String nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetContactEmailChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

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

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public SetContactEmailChangeBuilder nextValue(final String nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public String getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public String getNextValue() { + return this.nextValue; + } + + /** + * builds SetContactEmailChange with checking for non-null required values + * @return SetContactEmailChange + */ + public SetContactEmailChange build() { + Objects.requireNonNull(change, SetContactEmailChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetContactEmailChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetContactEmailChange.class + ": nextValue is missing"); + return new SetContactEmailChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetContactEmailChange without checking for non-null required values + * @return SetContactEmailChange + */ + public SetContactEmailChange buildUnchecked() { + return new SetContactEmailChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetContactEmailChangeBuilder + * @return builder + */ + public static SetContactEmailChangeBuilder of() { + return new SetContactEmailChangeBuilder(); + } + + /** + * create builder for SetContactEmailChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetContactEmailChangeBuilder of(final SetContactEmailChange template) { + SetContactEmailChangeBuilder builder = new SetContactEmailChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeImpl.java new file mode 100644 index 00000000000..32ef59acf6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetContactEmailChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Set Contact Email update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetContactEmailChangeImpl implements SetContactEmailChange, ModelBase { + + private String type; + + private String change; + + private String previousValue; + + private String nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetContactEmailChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final String previousValue, + @JsonProperty("nextValue") final String nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_CONTACT_EMAIL_CHANGE; + } + + /** + * create empty instance + */ + public SetContactEmailChangeImpl() { + this.type = SET_CONTACT_EMAIL_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public String getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public String getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final String previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final String nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetContactEmailChangeImpl that = (SetContactEmailChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChange.java new file mode 100644 index 00000000000..09f39c4f21c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChange.java @@ -0,0 +1,171 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.BusinessUnitStoreMode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Set Store Mode update action.

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

+ *     SetStoreModeChange setStoreModeChange = SetStoreModeChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitStoreMode.EXPLICIT)
+ *             .nextValue(BusinessUnitStoreMode.EXPLICIT)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetStoreModeChangeImpl.class) +public interface SetStoreModeChange extends Change { + + /** + * discriminator value for SetStoreModeChange + */ + String SET_STORE_MODE_CHANGE = "SetStoreModeChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @JsonProperty("previousValue") + public BusinessUnitStoreMode getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public BusinessUnitStoreMode getNextValue(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final BusinessUnitStoreMode previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final BusinessUnitStoreMode nextValue); + + /** + * factory method + * @return instance of SetStoreModeChange + */ + public static SetStoreModeChange of() { + return new SetStoreModeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetStoreModeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetStoreModeChange of(final SetStoreModeChange template) { + SetStoreModeChangeImpl instance = new SetStoreModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * factory method to create a deep copy of SetStoreModeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetStoreModeChange deepCopy(@Nullable final SetStoreModeChange template) { + if (template == null) { + return null; + } + SetStoreModeChangeImpl instance = new SetStoreModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetStoreModeChange + * @return builder + */ + public static SetStoreModeChangeBuilder builder() { + return SetStoreModeChangeBuilder.of(); + } + + /** + * create builder for SetStoreModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetStoreModeChangeBuilder builder(final SetStoreModeChange template) { + return SetStoreModeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetStoreModeChange(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-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeBuilder.java new file mode 100644 index 00000000000..bc79e9453f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetStoreModeChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetStoreModeChange setStoreModeChange = SetStoreModeChange.builder()
+ *             .change("{change}")
+ *             .previousValue(BusinessUnitStoreMode.EXPLICIT)
+ *             .nextValue(BusinessUnitStoreMode.EXPLICIT)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetStoreModeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.BusinessUnitStoreMode previousValue; + + private com.commercetools.history.models.common.BusinessUnitStoreMode nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetStoreModeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public SetStoreModeChangeBuilder previousValue( + final com.commercetools.history.models.common.BusinessUnitStoreMode previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public SetStoreModeChangeBuilder nextValue( + final com.commercetools.history.models.common.BusinessUnitStoreMode nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.BusinessUnitStoreMode getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.BusinessUnitStoreMode getNextValue() { + return this.nextValue; + } + + /** + * builds SetStoreModeChange with checking for non-null required values + * @return SetStoreModeChange + */ + public SetStoreModeChange build() { + Objects.requireNonNull(change, SetStoreModeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetStoreModeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetStoreModeChange.class + ": nextValue is missing"); + return new SetStoreModeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetStoreModeChange without checking for non-null required values + * @return SetStoreModeChange + */ + public SetStoreModeChange buildUnchecked() { + return new SetStoreModeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetStoreModeChangeBuilder + * @return builder + */ + public static SetStoreModeChangeBuilder of() { + return new SetStoreModeChangeBuilder(); + } + + /** + * create builder for SetStoreModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetStoreModeChangeBuilder of(final SetStoreModeChange template) { + SetStoreModeChangeBuilder builder = new SetStoreModeChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeImpl.java new file mode 100644 index 00000000000..06b489c8ac4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreModeChangeImpl.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Set Store Mode update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetStoreModeChangeImpl implements SetStoreModeChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.BusinessUnitStoreMode previousValue; + + private com.commercetools.history.models.common.BusinessUnitStoreMode nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetStoreModeChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.BusinessUnitStoreMode previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.BusinessUnitStoreMode nextValue) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_STORE_MODE_CHANGE; + } + + /** + * create empty instance + */ + public SetStoreModeChangeImpl() { + this.type = SET_STORE_MODE_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitStoreMode getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.BusinessUnitStoreMode getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.BusinessUnitStoreMode previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.BusinessUnitStoreMode nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetStoreModeChangeImpl that = (SetStoreModeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChange.java new file mode 100644 index 00000000000..c1f660e3f27 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChange.java @@ -0,0 +1,196 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.history.models.common.ProductVariantSelection; +import com.commercetools.history.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Change triggered by the Set Variant Selection update action.

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

+ *     SetVariantSelectionChange setVariantSelectionChange = SetVariantSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetVariantSelectionChangeImpl.class) +public interface SetVariantSelectionChange extends Change { + + /** + * discriminator value for SetVariantSelectionChange + */ + String SET_VARIANT_SELECTION_CHANGE = "SetVariantSelectionChange"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + *

Value before the change.

+ * @return previousValue + */ + @NotNull + @Valid + @JsonProperty("previousValue") + public ProductVariantSelection getPreviousValue(); + + /** + *

Value after the change.

+ * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public ProductVariantSelection getNextValue(); + + /** + *

Reference to the updated Product.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public Reference getProduct(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + *

Value before the change.

+ * @param previousValue value to be set + */ + + public void setPreviousValue(final ProductVariantSelection previousValue); + + /** + *

Value after the change.

+ * @param nextValue value to be set + */ + + public void setNextValue(final ProductVariantSelection nextValue); + + /** + *

Reference to the updated Product.

+ * @param product value to be set + */ + + public void setProduct(final Reference product); + + /** + * factory method + * @return instance of SetVariantSelectionChange + */ + public static SetVariantSelectionChange of() { + return new SetVariantSelectionChangeImpl(); + } + + /** + * factory method to create a shallow copy SetVariantSelectionChange + * @param template instance to be copied + * @return copy instance + */ + public static SetVariantSelectionChange of(final SetVariantSelectionChange template) { + SetVariantSelectionChangeImpl instance = new SetVariantSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + instance.setProduct(template.getProduct()); + return instance; + } + + /** + * factory method to create a deep copy of SetVariantSelectionChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetVariantSelectionChange deepCopy(@Nullable final SetVariantSelectionChange template) { + if (template == null) { + return null; + } + SetVariantSelectionChangeImpl instance = new SetVariantSelectionChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.ProductVariantSelection.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.ProductVariantSelection.deepCopy(template.getNextValue())); + instance.setProduct(com.commercetools.history.models.common.Reference.deepCopy(template.getProduct())); + return instance; + } + + /** + * builder factory method for SetVariantSelectionChange + * @return builder + */ + public static SetVariantSelectionChangeBuilder builder() { + return SetVariantSelectionChangeBuilder.of(); + } + + /** + * create builder for SetVariantSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetVariantSelectionChangeBuilder builder(final SetVariantSelectionChange template) { + return SetVariantSelectionChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetVariantSelectionChange(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-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeBuilder.java new file mode 100644 index 00000000000..d65cc5e776f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeBuilder.java @@ -0,0 +1,234 @@ + +package com.commercetools.history.models.change; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetVariantSelectionChangeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SetVariantSelectionChange setVariantSelectionChange = SetVariantSelectionChange.builder()
+ *             .change("{change}")
+ *             .previousValue(previousValueBuilder -> previousValueBuilder)
+ *             .nextValue(nextValueBuilder -> nextValueBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetVariantSelectionChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ProductVariantSelection previousValue; + + private com.commercetools.history.models.common.ProductVariantSelection nextValue; + + private com.commercetools.history.models.common.Reference product; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetVariantSelectionChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder previousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()) + .build(); + return this; + } + + /** + *

Value before the change.

+ * @param builder function to build the previousValue value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()); + return this; + } + + /** + *

Value before the change.

+ * @param previousValue value to be set + * @return Builder + */ + + public SetVariantSelectionChangeBuilder previousValue( + final com.commercetools.history.models.common.ProductVariantSelection previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder nextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()) + .build(); + return this; + } + + /** + *

Value after the change.

+ * @param builder function to build the nextValue value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder withNextValue( + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of()); + return this; + } + + /** + *

Value after the change.

+ * @param nextValue value to be set + * @return Builder + */ + + public SetVariantSelectionChangeBuilder nextValue( + final com.commercetools.history.models.common.ProductVariantSelection nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

Reference to the updated Product.

+ * @param builder function to build the product value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder product( + Function builder) { + this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Reference to the updated Product.

+ * @param builder function to build the product value + * @return Builder + */ + + public SetVariantSelectionChangeBuilder withProduct( + Function builder) { + this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + return this; + } + + /** + *

Reference to the updated Product.

+ * @param product value to be set + * @return Builder + */ + + public SetVariantSelectionChangeBuilder product(final com.commercetools.history.models.common.Reference product) { + this.product = product; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ * @return previousValue + */ + + public com.commercetools.history.models.common.ProductVariantSelection getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ * @return nextValue + */ + + public com.commercetools.history.models.common.ProductVariantSelection getNextValue() { + return this.nextValue; + } + + /** + *

Reference to the updated Product.

+ * @return product + */ + + public com.commercetools.history.models.common.Reference getProduct() { + return this.product; + } + + /** + * builds SetVariantSelectionChange with checking for non-null required values + * @return SetVariantSelectionChange + */ + public SetVariantSelectionChange build() { + Objects.requireNonNull(change, SetVariantSelectionChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetVariantSelectionChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetVariantSelectionChange.class + ": nextValue is missing"); + Objects.requireNonNull(product, SetVariantSelectionChange.class + ": product is missing"); + return new SetVariantSelectionChangeImpl(change, previousValue, nextValue, product); + } + + /** + * builds SetVariantSelectionChange without checking for non-null required values + * @return SetVariantSelectionChange + */ + public SetVariantSelectionChange buildUnchecked() { + return new SetVariantSelectionChangeImpl(change, previousValue, nextValue, product); + } + + /** + * factory method for an instance of SetVariantSelectionChangeBuilder + * @return builder + */ + public static SetVariantSelectionChangeBuilder of() { + return new SetVariantSelectionChangeBuilder(); + } + + /** + * create builder for SetVariantSelectionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetVariantSelectionChangeBuilder of(final SetVariantSelectionChange template) { + SetVariantSelectionChangeBuilder builder = new SetVariantSelectionChangeBuilder(); + builder.change = template.getChange(); + builder.previousValue = template.getPreviousValue(); + builder.nextValue = template.getNextValue(); + builder.product = template.getProduct(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeImpl.java new file mode 100644 index 00000000000..13e09e521bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.history.models.change; + +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; + +/** + *

Change triggered by the Set Variant Selection update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetVariantSelectionChangeImpl implements SetVariantSelectionChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.ProductVariantSelection previousValue; + + private com.commercetools.history.models.common.ProductVariantSelection nextValue; + + private com.commercetools.history.models.common.Reference product; + + /** + * create instance with all properties + */ + @JsonCreator + SetVariantSelectionChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.ProductVariantSelection previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.ProductVariantSelection nextValue, + @JsonProperty("product") final com.commercetools.history.models.common.Reference product) { + this.change = change; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.product = product; + this.type = SET_VARIANT_SELECTION_CHANGE; + } + + /** + * create empty instance + */ + public SetVariantSelectionChangeImpl() { + this.type = SET_VARIANT_SELECTION_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

Value before the change.

+ */ + + public com.commercetools.history.models.common.ProductVariantSelection getPreviousValue() { + return this.previousValue; + } + + /** + *

Value after the change.

+ */ + + public com.commercetools.history.models.common.ProductVariantSelection getNextValue() { + return this.nextValue; + } + + /** + *

Reference to the updated Product.

+ */ + + public com.commercetools.history.models.common.Reference getProduct() { + return this.product; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ProductVariantSelection previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.ProductVariantSelection nextValue) { + this.nextValue = nextValue; + } + + public void setProduct(final com.commercetools.history.models.common.Reference product) { + this.product = product; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetVariantSelectionChangeImpl that = (SetVariantSelectionChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(product, that.product) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(nextValue) + .append(product) + .toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ChangeHistoryResourceType.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ChangeHistoryResourceType.java index f01d6f86ec1..9cb71320f45 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ChangeHistoryResourceType.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ChangeHistoryResourceType.java @@ -16,6 +16,8 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ChangeHistoryResourceType extends JsonEnum { + ChangeHistoryResourceType BUSINESS_UNIT = ChangeHistoryResourceTypeEnum.BUSINESS_UNIT; + ChangeHistoryResourceType CART_DISCOUNT = ChangeHistoryResourceTypeEnum.CART_DISCOUNT; ChangeHistoryResourceType CATEGORY = ChangeHistoryResourceTypeEnum.CATEGORY; @@ -68,6 +70,11 @@ public interface ChangeHistoryResourceType extends JsonEnum { * possible values of ChangeHistoryResourceType */ enum ChangeHistoryResourceTypeEnum implements ChangeHistoryResourceType { + /** + * business-unit + */ + BUSINESS_UNIT("business-unit"), + /** * cart-discount */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/Record.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/Record.java index c0b93ac736d..667b0b8fbfd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/Record.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/Record.java @@ -12,7 +12,7 @@ import com.commercetools.history.models.change.Change; import com.commercetools.history.models.common.KeyReference; -import com.commercetools.history.models.common.Reference; +import com.commercetools.history.models.common.ResourceIdentifier; import com.commercetools.history.models.label.Label; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -118,13 +118,13 @@ public interface Record { public List getChanges(); /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @return resource */ @NotNull @Valid @JsonProperty("resource") - public Reference getResource(); + public ResourceIdentifier getResource(); /** *

References to the Stores associated with the Change.

@@ -212,11 +212,11 @@ public interface Record { public void setChanges(final List changes); /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @param resource value to be set */ - public void setResource(final Reference resource); + public void setResource(final ResourceIdentifier resource); /** *

References to the Stores associated with the Change.

@@ -294,7 +294,8 @@ public static Record deepCopy(@Nullable final Record template) { .map(com.commercetools.history.models.change.Change::deepCopy) .collect(Collectors.toList())) .orElse(null)); - instance.setResource(com.commercetools.history.models.common.Reference.deepCopy(template.getResource())); + instance.setResource( + com.commercetools.history.models.common.ResourceIdentifier.deepCopy(template.getResource())); instance.setStores(Optional.ofNullable(template.getStores()) .map(t -> t.stream() .map(com.commercetools.history.models.common.KeyReference::deepCopy) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordBuilder.java index 011fd62a6e3..3a3e4b5ea3a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordBuilder.java @@ -48,7 +48,7 @@ public class RecordBuilder implements Builder { private java.util.List changes; - private com.commercetools.history.models.common.Reference resource; + private com.commercetools.history.models.common.ResourceIdentifier resource; private java.util.List stores; @@ -250,36 +250,36 @@ public RecordBuilder withChanges( } /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @param builder function to build the resource value * @return Builder */ public RecordBuilder resource( - Function builder) { - this.resource = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.resource = builder.apply(com.commercetools.history.models.common.ResourceIdentifierBuilder.of()).build(); return this; } /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @param builder function to build the resource value * @return Builder */ public RecordBuilder withResource( - Function builder) { - this.resource = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.resource = builder.apply(com.commercetools.history.models.common.ResourceIdentifierBuilder.of()); return this; } /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @param resource value to be set * @return Builder */ - public RecordBuilder resource(final com.commercetools.history.models.common.Reference resource) { + public RecordBuilder resource(final com.commercetools.history.models.common.ResourceIdentifier resource) { this.resource = resource; return this; } @@ -457,11 +457,11 @@ public java.util.List getChanges } /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

* @return resource */ - public com.commercetools.history.models.common.Reference getResource() { + public com.commercetools.history.models.common.ResourceIdentifier getResource() { return this.resource; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordImpl.java index 1c5c2e0b974..c8c91e3a332 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordImpl.java @@ -37,7 +37,7 @@ public class RecordImpl implements Record, ModelBase { private java.util.List changes; - private com.commercetools.history.models.common.Reference resource; + private com.commercetools.history.models.common.ResourceIdentifier resource; private java.util.List stores; @@ -54,7 +54,7 @@ public class RecordImpl implements Record, ModelBase { @JsonProperty("label") final com.commercetools.history.models.label.Label label, @JsonProperty("previousLabel") final com.commercetools.history.models.label.Label previousLabel, @JsonProperty("changes") final java.util.List changes, - @JsonProperty("resource") final com.commercetools.history.models.common.Reference resource, + @JsonProperty("resource") final com.commercetools.history.models.common.ResourceIdentifier resource, @JsonProperty("stores") final java.util.List stores, @JsonProperty("withoutChanges") final Boolean withoutChanges) { this.version = version; @@ -143,10 +143,10 @@ public java.util.List getChanges } /** - *

Reference to the changed resource.

+ *

ResourceIdentifier of the changed resource.

*/ - public com.commercetools.history.models.common.Reference getResource() { + public com.commercetools.history.models.common.ResourceIdentifier getResource() { return this.resource; } @@ -203,7 +203,7 @@ public void setChanges(final java.util.List + * Example to create an instance using the builder pattern + *
+ *

+ *     Associate associate = Associate.builder()
+ *             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
+ *             .customer(customerBuilder -> customerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateImpl.class) +public interface Associate { + + /** + * + * @return associateRoleAssignments + */ + @NotNull + @Valid + @JsonProperty("associateRoleAssignments") + public List getAssociateRoleAssignments(); + + /** + * + * @return customer + */ + @NotNull + @Valid + @JsonProperty("customer") + public Reference getCustomer(); + + /** + * set associateRoleAssignments + * @param associateRoleAssignments values to be set + */ + + @JsonIgnore + public void setAssociateRoleAssignments(final AssociateRoleAssignment... associateRoleAssignments); + + /** + * set associateRoleAssignments + * @param associateRoleAssignments values to be set + */ + + public void setAssociateRoleAssignments(final List associateRoleAssignments); + + /** + * set customer + * @param customer value to be set + */ + + public void setCustomer(final Reference customer); + + /** + * factory method + * @return instance of Associate + */ + public static Associate of() { + return new AssociateImpl(); + } + + /** + * factory method to create a shallow copy Associate + * @param template instance to be copied + * @return copy instance + */ + public static Associate of(final Associate template) { + AssociateImpl instance = new AssociateImpl(); + instance.setAssociateRoleAssignments(template.getAssociateRoleAssignments()); + instance.setCustomer(template.getCustomer()); + return instance; + } + + /** + * factory method to create a deep copy of Associate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Associate deepCopy(@Nullable final Associate template) { + if (template == null) { + return null; + } + AssociateImpl instance = new AssociateImpl(); + instance.setAssociateRoleAssignments(Optional.ofNullable(template.getAssociateRoleAssignments()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.AssociateRoleAssignment::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer())); + return instance; + } + + /** + * builder factory method for Associate + * @return builder + */ + public static AssociateBuilder builder() { + return AssociateBuilder.of(); + } + + /** + * create builder for Associate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateBuilder builder(final Associate template) { + return AssociateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociate(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-history/src/main/java-generated/com/commercetools/history/models/common/AssociateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateBuilder.java new file mode 100644 index 00000000000..d779495db29 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateBuilder.java @@ -0,0 +1,214 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     Associate associate = Associate.builder()
+ *             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
+ *             .customer(customerBuilder -> customerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateBuilder implements Builder { + + private java.util.List associateRoleAssignments; + + private com.commercetools.history.models.common.Reference customer; + + /** + * set values to the associateRoleAssignments + * @param associateRoleAssignments value to be set + * @return Builder + */ + + public AssociateBuilder associateRoleAssignments( + final com.commercetools.history.models.common.AssociateRoleAssignment... associateRoleAssignments) { + this.associateRoleAssignments = new ArrayList<>(Arrays.asList(associateRoleAssignments)); + return this; + } + + /** + * set value to the associateRoleAssignments + * @param associateRoleAssignments value to be set + * @return Builder + */ + + public AssociateBuilder associateRoleAssignments( + final java.util.List associateRoleAssignments) { + this.associateRoleAssignments = associateRoleAssignments; + return this; + } + + /** + * add values to the associateRoleAssignments + * @param associateRoleAssignments value to be set + * @return Builder + */ + + public AssociateBuilder plusAssociateRoleAssignments( + final com.commercetools.history.models.common.AssociateRoleAssignment... associateRoleAssignments) { + if (this.associateRoleAssignments == null) { + this.associateRoleAssignments = new ArrayList<>(); + } + this.associateRoleAssignments.addAll(Arrays.asList(associateRoleAssignments)); + return this; + } + + /** + * add the value to the associateRoleAssignments using the builder function + * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateBuilder plusAssociateRoleAssignments( + Function builder) { + if (this.associateRoleAssignments == null) { + this.associateRoleAssignments = new ArrayList<>(); + } + this.associateRoleAssignments.add( + builder.apply(com.commercetools.history.models.common.AssociateRoleAssignmentBuilder.of()).build()); + return this; + } + + /** + * set the value to the associateRoleAssignments using the builder function + * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateBuilder withAssociateRoleAssignments( + Function builder) { + this.associateRoleAssignments = new ArrayList<>(); + this.associateRoleAssignments.add( + builder.apply(com.commercetools.history.models.common.AssociateRoleAssignmentBuilder.of()).build()); + return this; + } + + /** + * add the value to the associateRoleAssignments using the builder function + * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateBuilder addAssociateRoleAssignments( + Function builder) { + return plusAssociateRoleAssignments( + builder.apply(com.commercetools.history.models.common.AssociateRoleAssignmentBuilder.of())); + } + + /** + * set the value to the associateRoleAssignments using the builder function + * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateBuilder setAssociateRoleAssignments( + Function builder) { + return associateRoleAssignments( + builder.apply(com.commercetools.history.models.common.AssociateRoleAssignmentBuilder.of())); + } + + /** + * set the value to the customer using the builder function + * @param builder function to build the customer value + * @return Builder + */ + + public AssociateBuilder customer( + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + * set the value to the customer using the builder function + * @param builder function to build the customer value + * @return Builder + */ + + public AssociateBuilder withCustomer( + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + return this; + } + + /** + * set the value to the customer + * @param customer value to be set + * @return Builder + */ + + public AssociateBuilder customer(final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; + return this; + } + + /** + * value of associateRoleAssignments} + * @return associateRoleAssignments + */ + + public java.util.List getAssociateRoleAssignments() { + return this.associateRoleAssignments; + } + + /** + * value of customer} + * @return customer + */ + + public com.commercetools.history.models.common.Reference getCustomer() { + return this.customer; + } + + /** + * builds Associate with checking for non-null required values + * @return Associate + */ + public Associate build() { + Objects.requireNonNull(associateRoleAssignments, Associate.class + ": associateRoleAssignments is missing"); + Objects.requireNonNull(customer, Associate.class + ": customer is missing"); + return new AssociateImpl(associateRoleAssignments, customer); + } + + /** + * builds Associate without checking for non-null required values + * @return Associate + */ + public Associate buildUnchecked() { + return new AssociateImpl(associateRoleAssignments, customer); + } + + /** + * factory method for an instance of AssociateBuilder + * @return builder + */ + public static AssociateBuilder of() { + return new AssociateBuilder(); + } + + /** + * create builder for Associate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateBuilder of(final Associate template) { + AssociateBuilder builder = new AssociateBuilder(); + builder.associateRoleAssignments = template.getAssociateRoleAssignments(); + builder.customer = template.getCustomer(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateImpl.java new file mode 100644 index 00000000000..ef4f693ff8e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateImpl.java @@ -0,0 +1,94 @@ + +package com.commercetools.history.models.common; + +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; + +/** + * Associate + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateImpl implements Associate, ModelBase { + + private java.util.List associateRoleAssignments; + + private com.commercetools.history.models.common.Reference customer; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateImpl( + @JsonProperty("associateRoleAssignments") final java.util.List associateRoleAssignments, + @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer) { + this.associateRoleAssignments = associateRoleAssignments; + this.customer = customer; + } + + /** + * create empty instance + */ + public AssociateImpl() { + } + + /** + * + */ + + public java.util.List getAssociateRoleAssignments() { + return this.associateRoleAssignments; + } + + /** + * + */ + + public com.commercetools.history.models.common.Reference getCustomer() { + return this.customer; + } + + public void setAssociateRoleAssignments( + final com.commercetools.history.models.common.AssociateRoleAssignment... associateRoleAssignments) { + this.associateRoleAssignments = new ArrayList<>(Arrays.asList(associateRoleAssignments)); + } + + public void setAssociateRoleAssignments( + final java.util.List associateRoleAssignments) { + this.associateRoleAssignments = associateRoleAssignments; + } + + public void setCustomer(final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AssociateImpl that = (AssociateImpl) o; + + return new EqualsBuilder().append(associateRoleAssignments, that.associateRoleAssignments) + .append(customer, that.customer) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(associateRoleAssignments).append(customer).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignment.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignment.java new file mode 100644 index 00000000000..3462b0cd758 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignment.java @@ -0,0 +1,142 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateRoleAssignment + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AssociateRoleAssignment associateRoleAssignment = AssociateRoleAssignment.builder()
+ *             .associateRole(associateRoleBuilder -> associateRoleBuilder)
+ *             .inheritance(AssociateRoleInheritanceMode.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateRoleAssignmentImpl.class) +public interface AssociateRoleAssignment { + + /** + * + * @return associateRole + */ + @NotNull + @Valid + @JsonProperty("associateRole") + public KeyReference getAssociateRole(); + + /** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ * @return inheritance + */ + @NotNull + @JsonProperty("inheritance") + public AssociateRoleInheritanceMode getInheritance(); + + /** + * set associateRole + * @param associateRole value to be set + */ + + public void setAssociateRole(final KeyReference associateRole); + + /** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ * @param inheritance value to be set + */ + + public void setInheritance(final AssociateRoleInheritanceMode inheritance); + + /** + * factory method + * @return instance of AssociateRoleAssignment + */ + public static AssociateRoleAssignment of() { + return new AssociateRoleAssignmentImpl(); + } + + /** + * factory method to create a shallow copy AssociateRoleAssignment + * @param template instance to be copied + * @return copy instance + */ + public static AssociateRoleAssignment of(final AssociateRoleAssignment template) { + AssociateRoleAssignmentImpl instance = new AssociateRoleAssignmentImpl(); + instance.setAssociateRole(template.getAssociateRole()); + instance.setInheritance(template.getInheritance()); + return instance; + } + + /** + * factory method to create a deep copy of AssociateRoleAssignment + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AssociateRoleAssignment deepCopy(@Nullable final AssociateRoleAssignment template) { + if (template == null) { + return null; + } + AssociateRoleAssignmentImpl instance = new AssociateRoleAssignmentImpl(); + instance.setAssociateRole( + com.commercetools.history.models.common.KeyReference.deepCopy(template.getAssociateRole())); + instance.setInheritance(template.getInheritance()); + return instance; + } + + /** + * builder factory method for AssociateRoleAssignment + * @return builder + */ + public static AssociateRoleAssignmentBuilder builder() { + return AssociateRoleAssignmentBuilder.of(); + } + + /** + * create builder for AssociateRoleAssignment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleAssignmentBuilder builder(final AssociateRoleAssignment template) { + return AssociateRoleAssignmentBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociateRoleAssignment(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-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentBuilder.java new file mode 100644 index 00000000000..9cafa643c3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateRoleAssignmentBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AssociateRoleAssignment associateRoleAssignment = AssociateRoleAssignment.builder()
+ *             .associateRole(associateRoleBuilder -> associateRoleBuilder)
+ *             .inheritance(AssociateRoleInheritanceMode.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleAssignmentBuilder implements Builder { + + private com.commercetools.history.models.common.KeyReference associateRole; + + private com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance; + + /** + * set the value to the associateRole using the builder function + * @param builder function to build the associateRole value + * @return Builder + */ + + public AssociateRoleAssignmentBuilder associateRole( + Function builder) { + this.associateRole = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + return this; + } + + /** + * set the value to the associateRole using the builder function + * @param builder function to build the associateRole value + * @return Builder + */ + + public AssociateRoleAssignmentBuilder withAssociateRole( + Function builder) { + this.associateRole = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); + return this; + } + + /** + * set the value to the associateRole + * @param associateRole value to be set + * @return Builder + */ + + public AssociateRoleAssignmentBuilder associateRole( + final com.commercetools.history.models.common.KeyReference associateRole) { + this.associateRole = associateRole; + return this; + } + + /** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ * @param inheritance value to be set + * @return Builder + */ + + public AssociateRoleAssignmentBuilder inheritance( + final com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance) { + this.inheritance = inheritance; + return this; + } + + /** + * value of associateRole} + * @return associateRole + */ + + public com.commercetools.history.models.common.KeyReference getAssociateRole() { + return this.associateRole; + } + + /** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ * @return inheritance + */ + + public com.commercetools.history.models.common.AssociateRoleInheritanceMode getInheritance() { + return this.inheritance; + } + + /** + * builds AssociateRoleAssignment with checking for non-null required values + * @return AssociateRoleAssignment + */ + public AssociateRoleAssignment build() { + Objects.requireNonNull(associateRole, AssociateRoleAssignment.class + ": associateRole is missing"); + Objects.requireNonNull(inheritance, AssociateRoleAssignment.class + ": inheritance is missing"); + return new AssociateRoleAssignmentImpl(associateRole, inheritance); + } + + /** + * builds AssociateRoleAssignment without checking for non-null required values + * @return AssociateRoleAssignment + */ + public AssociateRoleAssignment buildUnchecked() { + return new AssociateRoleAssignmentImpl(associateRole, inheritance); + } + + /** + * factory method for an instance of AssociateRoleAssignmentBuilder + * @return builder + */ + public static AssociateRoleAssignmentBuilder of() { + return new AssociateRoleAssignmentBuilder(); + } + + /** + * create builder for AssociateRoleAssignment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleAssignmentBuilder of(final AssociateRoleAssignment template) { + AssociateRoleAssignmentBuilder builder = new AssociateRoleAssignmentBuilder(); + builder.associateRole = template.getAssociateRole(); + builder.inheritance = template.getInheritance(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentImpl.java new file mode 100644 index 00000000000..1235db9fde7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentImpl.java @@ -0,0 +1,88 @@ + +package com.commercetools.history.models.common; + +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; + +/** + * AssociateRoleAssignment + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleAssignmentImpl implements AssociateRoleAssignment, ModelBase { + + private com.commercetools.history.models.common.KeyReference associateRole; + + private com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateRoleAssignmentImpl( + @JsonProperty("associateRole") final com.commercetools.history.models.common.KeyReference associateRole, + @JsonProperty("inheritance") final com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance) { + this.associateRole = associateRole; + this.inheritance = inheritance; + } + + /** + * create empty instance + */ + public AssociateRoleAssignmentImpl() { + } + + /** + * + */ + + public com.commercetools.history.models.common.KeyReference getAssociateRole() { + return this.associateRole; + } + + /** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ */ + + public com.commercetools.history.models.common.AssociateRoleInheritanceMode getInheritance() { + return this.inheritance; + } + + public void setAssociateRole(final com.commercetools.history.models.common.KeyReference associateRole) { + this.associateRole = associateRole; + } + + public void setInheritance(final com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance) { + this.inheritance = inheritance; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AssociateRoleAssignmentImpl that = (AssociateRoleAssignmentImpl) o; + + return new EqualsBuilder().append(associateRole, that.associateRole) + .append(inheritance, that.inheritance) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(associateRole).append(inheritance).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleInheritanceMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleInheritanceMode.java new file mode 100644 index 00000000000..161ed78f002 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleInheritanceMode.java @@ -0,0 +1,112 @@ + +package com.commercetools.history.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Determines whether an AssociateRoleAssignment can be inherited by child Business Units.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface AssociateRoleInheritanceMode extends JsonEnum { + + AssociateRoleInheritanceMode ENABLED = AssociateRoleInheritanceModeEnum.ENABLED; + + AssociateRoleInheritanceMode DISABLED = AssociateRoleInheritanceModeEnum.DISABLED; + + /** + * possible values of AssociateRoleInheritanceMode + */ + enum AssociateRoleInheritanceModeEnum implements AssociateRoleInheritanceMode { + /** + * Enabled + */ + ENABLED("Enabled"), + + /** + * Disabled + */ + DISABLED("Disabled"); + private final String jsonName; + + private AssociateRoleInheritanceModeEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of AssociateRoleInheritanceMode + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static AssociateRoleInheritanceMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new AssociateRoleInheritanceMode() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static AssociateRoleInheritanceMode[] values() { + return AssociateRoleInheritanceModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitAssociateMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitAssociateMode.java new file mode 100644 index 00000000000..2e1de5cfb9f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitAssociateMode.java @@ -0,0 +1,112 @@ + +package com.commercetools.history.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Determines whether a Business Unit can inherit Associates from a parent.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitAssociateMode extends JsonEnum { + + BusinessUnitAssociateMode EXPLICIT = BusinessUnitAssociateModeEnum.EXPLICIT; + + BusinessUnitAssociateMode EXPLICIT_AND_FROM_PARENT = BusinessUnitAssociateModeEnum.EXPLICIT_AND_FROM_PARENT; + + /** + * possible values of BusinessUnitAssociateMode + */ + enum BusinessUnitAssociateModeEnum implements BusinessUnitAssociateMode { + /** + * Explicit + */ + EXPLICIT("Explicit"), + + /** + * ExplicitAndFromParent + */ + EXPLICIT_AND_FROM_PARENT("ExplicitAndFromParent"); + private final String jsonName; + + private BusinessUnitAssociateModeEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of BusinessUnitAssociateMode + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static BusinessUnitAssociateMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitAssociateMode() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static BusinessUnitAssociateMode[] values() { + return BusinessUnitAssociateModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStatus.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStatus.java new file mode 100644 index 00000000000..e7e1af5fc98 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStatus.java @@ -0,0 +1,112 @@ + +package com.commercetools.history.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Indicates whether the Business Unit can be edited and used in Carts, Orders, Quote Requests, or Quotes.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitStatus extends JsonEnum { + + BusinessUnitStatus ACTIVE = BusinessUnitStatusEnum.ACTIVE; + + BusinessUnitStatus INACTIVE = BusinessUnitStatusEnum.INACTIVE; + + /** + * possible values of BusinessUnitStatus + */ + enum BusinessUnitStatusEnum implements BusinessUnitStatus { + /** + * Active + */ + ACTIVE("Active"), + + /** + * Inactive + */ + INACTIVE("Inactive"); + private final String jsonName; + + private BusinessUnitStatusEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of BusinessUnitStatus + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static BusinessUnitStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitStatus() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static BusinessUnitStatus[] values() { + return BusinessUnitStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStoreMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStoreMode.java new file mode 100644 index 00000000000..9dfde26cb31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitStoreMode.java @@ -0,0 +1,112 @@ + +package com.commercetools.history.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from its parent unit.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitStoreMode extends JsonEnum { + + BusinessUnitStoreMode EXPLICIT = BusinessUnitStoreModeEnum.EXPLICIT; + + BusinessUnitStoreMode FROM_PARENT = BusinessUnitStoreModeEnum.FROM_PARENT; + + /** + * possible values of BusinessUnitStoreMode + */ + enum BusinessUnitStoreModeEnum implements BusinessUnitStoreMode { + /** + * Explicit + */ + EXPLICIT("Explicit"), + + /** + * FromParent + */ + FROM_PARENT("FromParent"); + private final String jsonName; + + private BusinessUnitStoreModeEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of BusinessUnitStoreMode + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static BusinessUnitStoreMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitStoreMode() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static BusinessUnitStoreMode[] values() { + return BusinessUnitStoreModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReference.java index 8b943f566e3..dd0f22f96e6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReference.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReference.java @@ -22,7 +22,7 @@ *

  *     KeyReference keyReference = KeyReference.builder()
  *             .key("{key}")
- *             .typeId(ReferenceTypeId.CART)
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
  *             .build()
  * 
* diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceBuilder.java index 505d324e2f1..a46f2e31e98 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceBuilder.java @@ -14,7 +14,7 @@ *

  *     KeyReference keyReference = KeyReference.builder()
  *             .key("{key}")
- *             .typeId(ReferenceTypeId.CART)
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
  *             .build()
  * 
* diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusion.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java similarity index 52% rename from commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusion.java rename to commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java index 9c0761e27c6..f6393e9bf29 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusion.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java @@ -1,5 +1,5 @@ -package com.commercetools.api.models.product_selection; +package com.commercetools.history.models.common; import java.time.*; import java.util.*; @@ -14,27 +14,22 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

Only Product Variants with explicitly stated SKUs are part of the Product Selection.

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

- *     ProductVariantSelectionInclusion productVariantSelectionInclusion = ProductVariantSelectionInclusion.builder()
+ *     ProductVariantSelection productVariantSelection = ProductVariantSelection.builder()
+ *             .type(ProductVariantSelectionTypeEnum.INCLUSION)
  *             .plusSkus(skusBuilder -> skusBuilder)
  *             .build()
  * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductVariantSelectionInclusionImpl.class) -@Deprecated -public interface ProductVariantSelectionInclusion extends ProductVariantSelection { - - /** - * discriminator value for ProductVariantSelectionInclusion - */ - String INCLUSION = "inclusion"; +@JsonDeserialize(as = ProductVariantSelectionImpl.class) +public interface ProductVariantSelection { /** * @@ -45,7 +40,7 @@ public interface ProductVariantSelectionInclusion extends ProductVariantSelectio public ProductVariantSelectionTypeEnum getType(); /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

+ * * @return skus */ @NotNull @@ -53,7 +48,14 @@ public interface ProductVariantSelectionInclusion extends ProductVariantSelectio public List getSkus(); /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

+ * set type + * @param type value to be set + */ + + public void setType(final ProductVariantSelectionTypeEnum type); + + /** + * set skus * @param skus values to be set */ @@ -61,7 +63,7 @@ public interface ProductVariantSelectionInclusion extends ProductVariantSelectio public void setSkus(final String... skus); /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

+ * set skus * @param skus values to be set */ @@ -69,53 +71,55 @@ public interface ProductVariantSelectionInclusion extends ProductVariantSelectio /** * factory method - * @return instance of ProductVariantSelectionInclusion + * @return instance of ProductVariantSelection */ - public static ProductVariantSelectionInclusion of() { - return new ProductVariantSelectionInclusionImpl(); + public static ProductVariantSelection of() { + return new ProductVariantSelectionImpl(); } /** - * factory method to create a shallow copy ProductVariantSelectionInclusion + * factory method to create a shallow copy ProductVariantSelection * @param template instance to be copied * @return copy instance */ - public static ProductVariantSelectionInclusion of(final ProductVariantSelectionInclusion template) { - ProductVariantSelectionInclusionImpl instance = new ProductVariantSelectionInclusionImpl(); + public static ProductVariantSelection of(final ProductVariantSelection template) { + ProductVariantSelectionImpl instance = new ProductVariantSelectionImpl(); + instance.setType(template.getType()); instance.setSkus(template.getSkus()); return instance; } /** - * factory method to create a deep copy of ProductVariantSelectionInclusion + * factory method to create a deep copy of ProductVariantSelection * @param template instance to be copied * @return copy instance */ @Nullable - public static ProductVariantSelectionInclusion deepCopy(@Nullable final ProductVariantSelectionInclusion template) { + public static ProductVariantSelection deepCopy(@Nullable final ProductVariantSelection template) { if (template == null) { return null; } - ProductVariantSelectionInclusionImpl instance = new ProductVariantSelectionInclusionImpl(); + ProductVariantSelectionImpl instance = new ProductVariantSelectionImpl(); + instance.setType(template.getType()); instance.setSkus(Optional.ofNullable(template.getSkus()).map(ArrayList::new).orElse(null)); return instance; } /** - * builder factory method for ProductVariantSelectionInclusion + * builder factory method for ProductVariantSelection * @return builder */ - public static ProductVariantSelectionInclusionBuilder builder() { - return ProductVariantSelectionInclusionBuilder.of(); + public static ProductVariantSelectionBuilder builder() { + return ProductVariantSelectionBuilder.of(); } /** - * create builder for ProductVariantSelectionInclusion instance + * create builder for ProductVariantSelection instance * @param template instance with prefilled values for the builder * @return builder */ - public static ProductVariantSelectionInclusionBuilder builder(final ProductVariantSelectionInclusion template) { - return ProductVariantSelectionInclusionBuilder.of(template); + public static ProductVariantSelectionBuilder builder(final ProductVariantSelection template) { + return ProductVariantSelectionBuilder.of(template); } /** @@ -124,7 +128,7 @@ public static ProductVariantSelectionInclusionBuilder builder(final ProductVaria * @param helper function to map the object * @return mapped value */ - default T withProductVariantSelectionInclusion(Function helper) { + default T withProductVariantSelection(Function helper) { return helper.apply(this); } @@ -132,11 +136,11 @@ default T withProductVariantSelectionInclusion(Function typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { @Override public String toString() { - return "TypeReference"; + return "TypeReference"; } }; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionBuilder.java new file mode 100644 index 00000000000..3b59a2800a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionBuilder.java @@ -0,0 +1,133 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantSelectionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantSelection productVariantSelection = ProductVariantSelection.builder()
+ *             .type(ProductVariantSelectionTypeEnum.INCLUSION)
+ *             .plusSkus(skusBuilder -> skusBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantSelectionBuilder implements Builder { + + private com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type; + + private java.util.List skus; + + /** + * set the value to the type + * @param type value to be set + * @return Builder + */ + + public ProductVariantSelectionBuilder type( + final com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type) { + this.type = type; + return this; + } + + /** + * set values to the skus + * @param skus value to be set + * @return Builder + */ + + public ProductVariantSelectionBuilder skus(final String... skus) { + this.skus = new ArrayList<>(Arrays.asList(skus)); + return this; + } + + /** + * set value to the skus + * @param skus value to be set + * @return Builder + */ + + public ProductVariantSelectionBuilder skus(final java.util.List skus) { + this.skus = skus; + return this; + } + + /** + * add values to the skus + * @param skus value to be set + * @return Builder + */ + + public ProductVariantSelectionBuilder plusSkus(final String... skus) { + if (this.skus == null) { + this.skus = new ArrayList<>(); + } + this.skus.addAll(Arrays.asList(skus)); + return this; + } + + /** + * value of type} + * @return type + */ + + public com.commercetools.history.models.common.ProductVariantSelectionTypeEnum getType() { + return this.type; + } + + /** + * value of skus} + * @return skus + */ + + public java.util.List getSkus() { + return this.skus; + } + + /** + * builds ProductVariantSelection with checking for non-null required values + * @return ProductVariantSelection + */ + public ProductVariantSelection build() { + Objects.requireNonNull(type, ProductVariantSelection.class + ": type is missing"); + Objects.requireNonNull(skus, ProductVariantSelection.class + ": skus is missing"); + return new ProductVariantSelectionImpl(type, skus); + } + + /** + * builds ProductVariantSelection without checking for non-null required values + * @return ProductVariantSelection + */ + public ProductVariantSelection buildUnchecked() { + return new ProductVariantSelectionImpl(type, skus); + } + + /** + * factory method for an instance of ProductVariantSelectionBuilder + * @return builder + */ + public static ProductVariantSelectionBuilder of() { + return new ProductVariantSelectionBuilder(); + } + + /** + * create builder for ProductVariantSelection instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantSelectionBuilder of(final ProductVariantSelection template) { + ProductVariantSelectionBuilder builder = new ProductVariantSelectionBuilder(); + builder.type = template.getType(); + builder.skus = template.getSkus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java similarity index 60% rename from commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionImpl.java rename to commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java index 86b680e8d9a..38e7e06de4e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_selection/ProductVariantSelectionInclusionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java @@ -1,5 +1,5 @@ -package com.commercetools.api.models.product_selection; +package com.commercetools.history.models.common; import java.time.*; import java.util.*; @@ -15,13 +15,12 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

Only Product Variants with explicitly stated SKUs are part of the Product Selection.

+ * ProductVariantSelection */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@Deprecated -public class ProductVariantSelectionInclusionImpl implements ProductVariantSelectionInclusion, ModelBase { +public class ProductVariantSelectionImpl implements ProductVariantSelection, ModelBase { - private com.commercetools.api.models.product_selection.ProductVariantSelectionTypeEnum type; + private com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type; private java.util.List skus; @@ -29,34 +28,39 @@ public class ProductVariantSelectionInclusionImpl implements ProductVariantSelec * create instance with all properties */ @JsonCreator - ProductVariantSelectionInclusionImpl(@JsonProperty("skus") final java.util.List skus) { + ProductVariantSelectionImpl( + @JsonProperty("type") final com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type, + @JsonProperty("skus") final java.util.List skus) { + this.type = type; this.skus = skus; - this.type = ProductVariantSelectionTypeEnum.findEnum("inclusion"); } /** * create empty instance */ - public ProductVariantSelectionInclusionImpl() { - this.type = ProductVariantSelectionTypeEnum.findEnum("inclusion"); + public ProductVariantSelectionImpl() { } /** * */ - public com.commercetools.api.models.product_selection.ProductVariantSelectionTypeEnum getType() { + public com.commercetools.history.models.common.ProductVariantSelectionTypeEnum getType() { return this.type; } /** - *

Non-empty array of SKUs representing Product Variants to be included into the Product Selection.

+ * */ public java.util.List getSkus() { return this.skus; } + public void setType(final com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type) { + this.type = type; + } + public void setSkus(final String... skus) { this.skus = new ArrayList<>(Arrays.asList(skus)); } @@ -73,7 +77,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; - ProductVariantSelectionInclusionImpl that = (ProductVariantSelectionInclusionImpl) o; + ProductVariantSelectionImpl that = (ProductVariantSelectionImpl) o; return new EqualsBuilder().append(type, that.type).append(skus, that.skus).isEquals(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTypeEnum.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTypeEnum.java new file mode 100644 index 00000000000..87382477c41 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTypeEnum.java @@ -0,0 +1,112 @@ + +package com.commercetools.history.models.common; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantSelectionTypeEnum + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ProductVariantSelectionTypeEnum extends JsonEnum { + + ProductVariantSelectionTypeEnum INCLUSION = ProductVariantSelectionTypeEnumEnum.INCLUSION; + + ProductVariantSelectionTypeEnum EXCLUSION = ProductVariantSelectionTypeEnumEnum.EXCLUSION; + + /** + * possible values of ProductVariantSelectionTypeEnum + */ + enum ProductVariantSelectionTypeEnumEnum implements ProductVariantSelectionTypeEnum { + /** + * inclusion + */ + INCLUSION("inclusion"), + + /** + * exclusion + */ + EXCLUSION("exclusion"); + private final String jsonName; + + private ProductVariantSelectionTypeEnumEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of ProductVariantSelectionTypeEnum + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static ProductVariantSelectionTypeEnum findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ProductVariantSelectionTypeEnum() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static ProductVariantSelectionTypeEnum[] values() { + return ProductVariantSelectionTypeEnumEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteState.java index 87773b48455..2b1642d8628 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteState.java @@ -20,6 +20,8 @@ public interface QuoteState extends JsonEnum { QuoteState DECLINED = QuoteStateEnum.DECLINED; + QuoteState DECLINED_FOR_RENEGOTIATION = QuoteStateEnum.DECLINED_FOR_RENEGOTIATION; + QuoteState ACCEPTED = QuoteStateEnum.ACCEPTED; QuoteState FAILED = QuoteStateEnum.FAILED; @@ -40,6 +42,11 @@ enum QuoteStateEnum implements QuoteState { */ DECLINED("Declined"), + /** + * DeclinedForRenegotiation + */ + DECLINED_FOR_RENEGOTIATION("DeclinedForRenegotiation"), + /** * Accepted */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reference.java index 513ceccc858..0b736e66130 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reference.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reference.java @@ -22,7 +22,7 @@ *

  *     Reference reference = Reference.builder()
  *             .id("{id}")
- *             .typeId(ReferenceTypeId.CART)
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
  *             .build()
  * 
* diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceBuilder.java index ea289c7458f..96bea58312f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceBuilder.java @@ -14,7 +14,7 @@ *

  *     Reference reference = Reference.builder()
  *             .id("{id}")
- *             .typeId(ReferenceTypeId.CART)
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
  *             .build()
  * 
* diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceTypeId.java index 86a1b61f9bc..bbc7a12381d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceTypeId.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceTypeId.java @@ -16,6 +16,10 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ReferenceTypeId extends JsonEnum { + ReferenceTypeId ASSOCIATE_ROLE = ReferenceTypeIdEnum.ASSOCIATE_ROLE; + + ReferenceTypeId BUSINESS_UNIT = ReferenceTypeIdEnum.BUSINESS_UNIT; + ReferenceTypeId CART = ReferenceTypeIdEnum.CART; ReferenceTypeId CART_DISCOUNT = ReferenceTypeIdEnum.CART_DISCOUNT; @@ -82,6 +86,16 @@ public interface ReferenceTypeId extends JsonEnum { * possible values of ReferenceTypeId */ enum ReferenceTypeIdEnum implements ReferenceTypeId { + /** + * associate-role + */ + ASSOCIATE_ROLE("associate-role"), + + /** + * business-unit + */ + BUSINESS_UNIT("business-unit"), + /** * cart */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifier.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifier.java new file mode 100644 index 00000000000..36d6ae6a501 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifier.java @@ -0,0 +1,157 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ResourceIdentifier + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
+ *             .id("{id}")
+ *             .key("{key}")
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ResourceIdentifierImpl.class) +public interface ResourceIdentifier { + + /** + * + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + * + * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + * + * @return typeId + */ + @NotNull + @JsonProperty("typeId") + public ReferenceTypeId getTypeId(); + + /** + * set id + * @param id value to be set + */ + + public void setId(final String id); + + /** + * set key + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * set typeId + * @param typeId value to be set + */ + + public void setTypeId(final ReferenceTypeId typeId); + + /** + * factory method + * @return instance of ResourceIdentifier + */ + public static ResourceIdentifier of() { + return new ResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy ResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static ResourceIdentifier of(final ResourceIdentifier template) { + ResourceIdentifierImpl instance = new ResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setTypeId(template.getTypeId()); + return instance; + } + + /** + * factory method to create a deep copy of ResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ResourceIdentifier deepCopy(@Nullable final ResourceIdentifier template) { + if (template == null) { + return null; + } + ResourceIdentifierImpl instance = new ResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setTypeId(template.getTypeId()); + return instance; + } + + /** + * builder factory method for ResourceIdentifier + * @return builder + */ + public static ResourceIdentifierBuilder builder() { + return ResourceIdentifierBuilder.of(); + } + + /** + * create builder for ResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ResourceIdentifierBuilder builder(final ResourceIdentifier template) { + return ResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withResourceIdentifier(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-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierBuilder.java new file mode 100644 index 00000000000..faca8cba2fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
+ *             .id("{id}")
+ *             .key("{key}")
+ *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceIdentifierBuilder implements Builder { + + private String id; + + private String key; + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + /** + * set the value to the id + * @param id value to be set + * @return Builder + */ + + public ResourceIdentifierBuilder id(final String id) { + this.id = id; + return this; + } + + /** + * set the value to the key + * @param key value to be set + * @return Builder + */ + + public ResourceIdentifierBuilder key(final String key) { + this.key = key; + return this; + } + + /** + * set the value to the typeId + * @param typeId value to be set + * @return Builder + */ + + public ResourceIdentifierBuilder typeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { + this.typeId = typeId; + return this; + } + + /** + * value of id} + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * value of key} + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * value of typeId} + * @return typeId + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + * builds ResourceIdentifier with checking for non-null required values + * @return ResourceIdentifier + */ + public ResourceIdentifier build() { + Objects.requireNonNull(id, ResourceIdentifier.class + ": id is missing"); + Objects.requireNonNull(key, ResourceIdentifier.class + ": key is missing"); + Objects.requireNonNull(typeId, ResourceIdentifier.class + ": typeId is missing"); + return new ResourceIdentifierImpl(id, key, typeId); + } + + /** + * builds ResourceIdentifier without checking for non-null required values + * @return ResourceIdentifier + */ + public ResourceIdentifier buildUnchecked() { + return new ResourceIdentifierImpl(id, key, typeId); + } + + /** + * factory method for an instance of ResourceIdentifierBuilder + * @return builder + */ + public static ResourceIdentifierBuilder of() { + return new ResourceIdentifierBuilder(); + } + + /** + * create builder for ResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ResourceIdentifierBuilder of(final ResourceIdentifier template) { + ResourceIdentifierBuilder builder = new ResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + builder.typeId = template.getTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierImpl.java new file mode 100644 index 00000000000..d0150f9481b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceIdentifierImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.history.models.common; + +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; + +/** + * ResourceIdentifier + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ResourceIdentifierImpl implements ResourceIdentifier, ModelBase { + + private String id; + + private String key; + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + /** + * create instance with all properties + */ + @JsonCreator + ResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId) { + this.id = id; + this.key = key; + this.typeId = typeId; + } + + /** + * create empty instance + */ + public ResourceIdentifierImpl() { + } + + /** + * + */ + + public String getId() { + return this.id; + } + + /** + * + */ + + public String getKey() { + return this.key; + } + + /** + * + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setTypeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { + this.typeId = typeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ResourceIdentifierImpl that = (ResourceIdentifierImpl) o; + + return new EqualsBuilder().append(id, that.id).append(key, that.key).append(typeId, that.typeId).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(key).append(typeId).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabel.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabel.java new file mode 100644 index 00000000000..ffe303394bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabel.java @@ -0,0 +1,152 @@ + +package com.commercetools.history.models.label; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitLabel + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     BusinessUnitLabel businessUnitLabel = BusinessUnitLabel.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BusinessUnitLabelImpl.class) +public interface BusinessUnitLabel extends Label { + + /** + * discriminator value for BusinessUnitLabel + */ + String BUSINESS_UNIT_LABEL = "BusinessUnitLabel"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

User-defined unique identifier of the Business Unit.

+ * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

Name of the Business Unit.

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

User-defined unique identifier of the Business Unit.

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

Name of the Business Unit.

+ * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of BusinessUnitLabel + */ + public static BusinessUnitLabel of() { + return new BusinessUnitLabelImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitLabel + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitLabel of(final BusinessUnitLabel template) { + BusinessUnitLabelImpl instance = new BusinessUnitLabelImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of BusinessUnitLabel + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitLabel deepCopy(@Nullable final BusinessUnitLabel template) { + if (template == null) { + return null; + } + BusinessUnitLabelImpl instance = new BusinessUnitLabelImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for BusinessUnitLabel + * @return builder + */ + public static BusinessUnitLabelBuilder builder() { + return BusinessUnitLabelBuilder.of(); + } + + /** + * create builder for BusinessUnitLabel instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitLabelBuilder builder(final BusinessUnitLabel template) { + return BusinessUnitLabelBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBusinessUnitLabel(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-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelBuilder.java new file mode 100644 index 00000000000..a36c1097f16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.history.models.label; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitLabelBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     BusinessUnitLabel businessUnitLabel = BusinessUnitLabel.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitLabelBuilder implements Builder { + + private String key; + + private String name; + + /** + *

User-defined unique identifier of the Business Unit.

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

Name of the Business Unit.

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

User-defined unique identifier of the Business Unit.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the Business Unit.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds BusinessUnitLabel with checking for non-null required values + * @return BusinessUnitLabel + */ + public BusinessUnitLabel build() { + Objects.requireNonNull(key, BusinessUnitLabel.class + ": key is missing"); + Objects.requireNonNull(name, BusinessUnitLabel.class + ": name is missing"); + return new BusinessUnitLabelImpl(key, name); + } + + /** + * builds BusinessUnitLabel without checking for non-null required values + * @return BusinessUnitLabel + */ + public BusinessUnitLabel buildUnchecked() { + return new BusinessUnitLabelImpl(key, name); + } + + /** + * factory method for an instance of BusinessUnitLabelBuilder + * @return builder + */ + public static BusinessUnitLabelBuilder of() { + return new BusinessUnitLabelBuilder(); + } + + /** + * create builder for BusinessUnitLabel instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitLabelBuilder of(final BusinessUnitLabel template) { + BusinessUnitLabelBuilder builder = new BusinessUnitLabelBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelImpl.java new file mode 100644 index 00000000000..95092560027 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/BusinessUnitLabelImpl.java @@ -0,0 +1,96 @@ + +package com.commercetools.history.models.label; + +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; + +/** + * BusinessUnitLabel + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitLabelImpl implements BusinessUnitLabel, ModelBase { + + private String type; + + private String key; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitLabelImpl(@JsonProperty("key") final String key, @JsonProperty("name") final String name) { + this.key = key; + this.name = name; + this.type = BUSINESS_UNIT_LABEL; + } + + /** + * create empty instance + */ + public BusinessUnitLabelImpl() { + this.type = BUSINESS_UNIT_LABEL; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

User-defined unique identifier of the Business Unit.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the Business Unit.

+ */ + + public String getName() { + return this.name; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitLabelImpl that = (BusinessUnitLabelImpl) o; + + return new EqualsBuilder().append(type, that.type).append(key, that.key).append(name, that.name).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(key).append(name).toHashCode(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/Label.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/Label.java index 57b91c6c0d5..5a846fa0e12 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/Label.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/Label.java @@ -20,14 +20,15 @@ * Example to create a subtype instance using the builder pattern *
*

- *     Label label = Label.customObjectLabelBuilder()
+ *     Label label = Label.businessUnitLabelBuilder()
  *             key("{key}")
- *             container("{container}")
+ *             name("{name}")
  *             .build()
  * 
*
*/ @JsonSubTypes({ + @JsonSubTypes.Type(value = com.commercetools.history.models.label.BusinessUnitLabelImpl.class, name = BusinessUnitLabel.BUSINESS_UNIT_LABEL), @JsonSubTypes.Type(value = com.commercetools.history.models.label.CustomObjectLabelImpl.class, name = CustomObjectLabel.CUSTOM_OBJECT_LABEL), @JsonSubTypes.Type(value = com.commercetools.history.models.label.CustomerLabelImpl.class, name = CustomerLabel.CUSTOMER_LABEL), @JsonSubTypes.Type(value = com.commercetools.history.models.label.LocalizedLabelImpl.class, name = LocalizedLabel.LOCALIZED_LABEL), @@ -62,6 +63,10 @@ public static Label deepCopy(@Nullable final Label template) { if (template == null) { return null; } + if (template instanceof com.commercetools.history.models.label.BusinessUnitLabel) { + return com.commercetools.history.models.label.BusinessUnitLabel + .deepCopy((com.commercetools.history.models.label.BusinessUnitLabel) template); + } if (template instanceof com.commercetools.history.models.label.CustomObjectLabel) { return com.commercetools.history.models.label.CustomObjectLabel .deepCopy((com.commercetools.history.models.label.CustomObjectLabel) template); @@ -110,6 +115,14 @@ public static Label deepCopy(@Nullable final Label template) { return instance; } + /** + * builder for businessUnitLabel subtype + * @return builder + */ + public static com.commercetools.history.models.label.BusinessUnitLabelBuilder businessUnitLabelBuilder() { + return com.commercetools.history.models.label.BusinessUnitLabelBuilder.of(); + } + /** * builder for customObjectLabel subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/LabelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/LabelBuilder.java index 9f37de8c942..a92b380dda8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/LabelBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/LabelBuilder.java @@ -11,6 +11,10 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LabelBuilder { + public com.commercetools.history.models.label.BusinessUnitLabelBuilder businessUnitLabelBuilder() { + return com.commercetools.history.models.label.BusinessUnitLabelBuilder.of(); + } + public com.commercetools.history.models.label.CustomObjectLabelBuilder customObjectLabelBuilder() { return com.commercetools.history.models.label.CustomObjectLabelBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java index 33850dfc17b..421b9470ea8 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java @@ -103,9 +103,9 @@ public static Object[][] requestWithMethodParameters() { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get() - .withResourceId("resourceId") + .withResourceKey("resourceKey") .createHttpRequest(), - "get", "test_projectKey/test_resourceType?resourceId=resourceId", }, + "get", "test_projectKey/test_resourceType?resourceKey=resourceKey", }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get() @@ -183,7 +183,7 @@ public static Object[][] executeMethodParameters() { new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get() - .withResourceId("resourceId"), }, + .withResourceKey("resourceKey"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get() diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java index 0c5a55e1af7..d3f5186ee3d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java @@ -94,6 +94,10 @@ public static Object[][] requestWithMethodParameters() { .get() .withResourceId("resourceId") .createHttpRequest(), "get", "test_projectKey?resourceId=resourceId", }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .get() + .withResourceKey("resourceKey") + .createHttpRequest(), "get", "test_projectKey?resourceKey=resourceKey", }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withSource("source").createHttpRequest(), "get", "test_projectKey?source=source", }, @@ -137,6 +141,7 @@ public static Object[][] executeMethodParameters() { new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withType("type"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withClientId("clientId"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withResourceId("resourceId"), }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withResourceKey("resourceKey"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withSource("source"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withChanges("changes"), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withStores("stores"), }, diff --git a/references.txt b/references.txt index f9b48dba8f9..5682296b8bf 100644 --- a/references.txt +++ b/references.txt @@ -49,3 +49,14 @@ a5814ceb8631fc43a168a14518ae04fb1abad79c a2b70e8534adc95d06e2ac575c87ddb836cadc8e de69de2aeb9d0e463a5f4b6500ac1236b12632eb 4c0d8eabf43bd0ec727284ccdd4cf11bd8e88714 +cca2a403a6ab01eb9e0bd2487c0d8f4a97b521bc +73a88391a0ae105b155ba5750a79911c55a27032 +9c804f3d600a9ed9bae0535190194e1f0fb5edc3 +0e092f8c9ffb0cd0c32d96afac63dcf420cca9b7 +0398f41f9807106d2dd50a30127b60b5a17ff3c2 +0398f41f9807106d2dd50a30127b60b5a17ff3c2 +684bfa3dd80d662f980ddabc041607f8869a4f04 +56e457c07223bda90a6b7ac4776e6d59f2ca9554 +1ce375bcc89b580bc63fe029066812b511e42dfb +469db24ebd23ce69a05ad4208ed3a69f97a012f8 +b8643304f30b6ab91906dd29ad787d9b2064d738